| 1 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 2 |
DENIED
|
moderate
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
} |
|
Show voter details
|
| 3 |
DENIED
|
edit
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
} |
|
Show voter details
|
| 4 |
DENIED
|
moderate
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
} |
|
Show voter details
|
| 5 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 6 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4031
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Given encouragement to try tmux, here is what I’ve come up with as a “one-liner” (script) that does what I was originally looking for:\n
\n
```\n
\n
<span style="color:#323232;">#!/bin/sh\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">tmux new-session -d -s split_screen_grep ; \n
</span><span style="color:#323232;"> send-keys "/bin/sh -c '$1' | tee /tmp/split_screen_grep.txt" C-m ; \n
</span><span style="color:#323232;"> split-window -h ; \n
</span><span style="color:#323232;"> select-pane -t 1 ; \n
</span><span style="color:#323232;"> send-keys "tail -f /tmp/split_screen_grep.txt | grep '$2'" C-m ;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">tmux attach-session -t split_screen_grep\n
</span>\n
```\n
\n
I use it as follows, first arg is a command, second arg is a pattern to search for:\n
\n
```\n
\n
<span style="color:#323232;">$ ./split-grep "cat big_file.txt" "tmux"\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1704165643 {#4040
date: 2024-01-02 04:20:43.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4029 …}
+nested: Doctrine\ORM\PersistentCollection {#4027 …}
+votes: Doctrine\ORM\PersistentCollection {#4025 …}
+reports: Doctrine\ORM\PersistentCollection {#4023 …}
+favourites: Doctrine\ORM\PersistentCollection {#3991 …}
+notifications: Doctrine\ORM\PersistentCollection {#3995 …}
-id: 272154
-bodyTs: "'/bin/sh':28,41 '/split-grep':95 '/tmp/split_screen_grep.txt':45,63 '1':43,57 '2':65 'arg':83,88 'attach':71 'attach-sess':70 'big_file.txt':97 'c':42,47,67 'c-m':46,66 'cat':96 'come':11 'command':86 'd':33 'encourag':2 'f':62 'first':82 'follow':81 'given':1 'grep':37,64,76 'h':52 'key':40,60 'liner':18 'look':26 'm':48,68 'new':31 'new-sess':30 'one':17 'one-lin':16 'origin':25 'pane':55 'pattern':91 'screen':36,75 'script':19 'search':93 'second':87 'select':54 'select-pan':53 'send':39,59 'send-key':38,58 'session':32,72 'split':35,50,74 'split-window':49 'tail':61 'tee':44 'tmux':5,29,69,98 'tri':4 'use':78 've':10 'window':51"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995722"
+editedAt: null
+createdAt: DateTimeImmutable @1704165643 {#3976
date: 2024-01-02 04:20:43.0 +01:00
}
} |
|
Show voter details
|
| 7 |
DENIED
|
edit
|
App\Entity\EntryComment {#4031
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Given encouragement to try tmux, here is what I’ve come up with as a “one-liner” (script) that does what I was originally looking for:\n
\n
```\n
\n
<span style="color:#323232;">#!/bin/sh\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">tmux new-session -d -s split_screen_grep ; \n
</span><span style="color:#323232;"> send-keys "/bin/sh -c '$1' | tee /tmp/split_screen_grep.txt" C-m ; \n
</span><span style="color:#323232;"> split-window -h ; \n
</span><span style="color:#323232;"> select-pane -t 1 ; \n
</span><span style="color:#323232;"> send-keys "tail -f /tmp/split_screen_grep.txt | grep '$2'" C-m ;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">tmux attach-session -t split_screen_grep\n
</span>\n
```\n
\n
I use it as follows, first arg is a command, second arg is a pattern to search for:\n
\n
```\n
\n
<span style="color:#323232;">$ ./split-grep "cat big_file.txt" "tmux"\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1704165643 {#4040
date: 2024-01-02 04:20:43.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4029 …}
+nested: Doctrine\ORM\PersistentCollection {#4027 …}
+votes: Doctrine\ORM\PersistentCollection {#4025 …}
+reports: Doctrine\ORM\PersistentCollection {#4023 …}
+favourites: Doctrine\ORM\PersistentCollection {#3991 …}
+notifications: Doctrine\ORM\PersistentCollection {#3995 …}
-id: 272154
-bodyTs: "'/bin/sh':28,41 '/split-grep':95 '/tmp/split_screen_grep.txt':45,63 '1':43,57 '2':65 'arg':83,88 'attach':71 'attach-sess':70 'big_file.txt':97 'c':42,47,67 'c-m':46,66 'cat':96 'come':11 'command':86 'd':33 'encourag':2 'f':62 'first':82 'follow':81 'given':1 'grep':37,64,76 'h':52 'key':40,60 'liner':18 'look':26 'm':48,68 'new':31 'new-sess':30 'one':17 'one-lin':16 'origin':25 'pane':55 'pattern':91 'screen':36,75 'script':19 'search':93 'second':87 'select':54 'select-pan':53 'send':39,59 'send-key':38,58 'session':32,72 'split':35,50,74 'split-window':49 'tail':61 'tee':44 'tmux':5,29,69,98 'tri':4 'use':78 've':10 'window':51"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995722"
+editedAt: null
+createdAt: DateTimeImmutable @1704165643 {#3976
date: 2024-01-02 04:20:43.0 +01:00
}
} |
|
Show voter details
|
| 8 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4031
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Given encouragement to try tmux, here is what I’ve come up with as a “one-liner” (script) that does what I was originally looking for:\n
\n
```\n
\n
<span style="color:#323232;">#!/bin/sh\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">tmux new-session -d -s split_screen_grep ; \n
</span><span style="color:#323232;"> send-keys "/bin/sh -c '$1' | tee /tmp/split_screen_grep.txt" C-m ; \n
</span><span style="color:#323232;"> split-window -h ; \n
</span><span style="color:#323232;"> select-pane -t 1 ; \n
</span><span style="color:#323232;"> send-keys "tail -f /tmp/split_screen_grep.txt | grep '$2'" C-m ;\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;">tmux attach-session -t split_screen_grep\n
</span>\n
```\n
\n
I use it as follows, first arg is a command, second arg is a pattern to search for:\n
\n
```\n
\n
<span style="color:#323232;">$ ./split-grep "cat big_file.txt" "tmux"\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1704165643 {#4040
date: 2024-01-02 04:20:43.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4029 …}
+nested: Doctrine\ORM\PersistentCollection {#4027 …}
+votes: Doctrine\ORM\PersistentCollection {#4025 …}
+reports: Doctrine\ORM\PersistentCollection {#4023 …}
+favourites: Doctrine\ORM\PersistentCollection {#3991 …}
+notifications: Doctrine\ORM\PersistentCollection {#3995 …}
-id: 272154
-bodyTs: "'/bin/sh':28,41 '/split-grep':95 '/tmp/split_screen_grep.txt':45,63 '1':43,57 '2':65 'arg':83,88 'attach':71 'attach-sess':70 'big_file.txt':97 'c':42,47,67 'c-m':46,66 'cat':96 'come':11 'command':86 'd':33 'encourag':2 'f':62 'first':82 'follow':81 'given':1 'grep':37,64,76 'h':52 'key':40,60 'liner':18 'look':26 'm':48,68 'new':31 'new-sess':30 'one':17 'one-lin':16 'origin':25 'pane':55 'pattern':91 'screen':36,75 'script':19 'search':93 'second':87 'select':54 'select-pan':53 'send':39,59 'send-key':38,58 'session':32,72 'split':35,50,74 'split-window':49 'tail':61 'tee':44 'tmux':5,29,69,98 'tri':4 'use':78 've':10 'window':51"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995722"
+editedAt: null
+createdAt: DateTimeImmutable @1704165643 {#3976
date: 2024-01-02 04:20:43.0 +01:00
}
} |
|
Show voter details
|
| 9 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 10 |
DENIED
|
moderate
|
App\Entity\EntryComment {#3980
+user: App\Entity\User {#3963 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Your request goes against the [unix philosophy](http://www.catb.org/~esr/writings/taoup/html/ch01s06.html). Grep does one thing and does it well. If you desire additional functionality, you should add another utility to accomplish what you want.\n
\n
> rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
\n
In your specific task, utilize bashims to do *(what I think)* you want:\n
\n
`rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ || echo “task failed”`
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704161174 {#4033
date: 2024-01-02 03:06:14.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#3984 …}
+nested: Doctrine\ORM\PersistentCollection {#3977 …}
+votes: Doctrine\ORM\PersistentCollection {#3974 …}
+reports: Doctrine\ORM\PersistentCollection {#3972 …}
+favourites: Doctrine\ORM\PersistentCollection {#3969 …}
+notifications: Doctrine\ORM\PersistentCollection {#3967 …}
-id: 272109
-bodyTs: "'/home':40,64 '/~esr/writings/taoup/html/ch01s06.html).':10 'accomplish':30 'add':26 'addit':22 'anoth':27 'backupdir':42,66 'bashim':50 'deni':44 'desir':21 'echo':67 'exclud':37,61 'exclude-from':36,60 'fail':69 'function':23 'goe':3 'grep':11,43 'nap':35,59 'one':13 'philosophi':7 'request':2 'rsync':34,58 'rsync-homedir-local.txt':39,63 'specif':47 'task':48,68 'thing':14 'think':55 'unix':6 'user':41,65 'util':28,49 'want':33,57 'well':18 'www.catb.org':9 'www.catb.org/~esr/writings/taoup/html/ch01s06.html).':8"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1925030"
+editedAt: DateTimeImmutable @1710644447 {#4035
date: 2024-03-17 04:00:47.0 +01:00
}
+createdAt: DateTimeImmutable @1704161174 {#4039
date: 2024-01-02 03:06:14.0 +01:00
}
} |
|
Show voter details
|
| 11 |
DENIED
|
edit
|
App\Entity\EntryComment {#3980
+user: App\Entity\User {#3963 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Your request goes against the [unix philosophy](http://www.catb.org/~esr/writings/taoup/html/ch01s06.html). Grep does one thing and does it well. If you desire additional functionality, you should add another utility to accomplish what you want.\n
\n
> rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
\n
In your specific task, utilize bashims to do *(what I think)* you want:\n
\n
`rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ || echo “task failed”`
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704161174 {#4033
date: 2024-01-02 03:06:14.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#3984 …}
+nested: Doctrine\ORM\PersistentCollection {#3977 …}
+votes: Doctrine\ORM\PersistentCollection {#3974 …}
+reports: Doctrine\ORM\PersistentCollection {#3972 …}
+favourites: Doctrine\ORM\PersistentCollection {#3969 …}
+notifications: Doctrine\ORM\PersistentCollection {#3967 …}
-id: 272109
-bodyTs: "'/home':40,64 '/~esr/writings/taoup/html/ch01s06.html).':10 'accomplish':30 'add':26 'addit':22 'anoth':27 'backupdir':42,66 'bashim':50 'deni':44 'desir':21 'echo':67 'exclud':37,61 'exclude-from':36,60 'fail':69 'function':23 'goe':3 'grep':11,43 'nap':35,59 'one':13 'philosophi':7 'request':2 'rsync':34,58 'rsync-homedir-local.txt':39,63 'specif':47 'task':48,68 'thing':14 'think':55 'unix':6 'user':41,65 'util':28,49 'want':33,57 'well':18 'www.catb.org':9 'www.catb.org/~esr/writings/taoup/html/ch01s06.html).':8"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1925030"
+editedAt: DateTimeImmutable @1710644447 {#4035
date: 2024-03-17 04:00:47.0 +01:00
}
+createdAt: DateTimeImmutable @1704161174 {#4039
date: 2024-01-02 03:06:14.0 +01:00
}
} |
|
Show voter details
|
| 12 |
DENIED
|
moderate
|
App\Entity\EntryComment {#3980
+user: App\Entity\User {#3963 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Your request goes against the [unix philosophy](http://www.catb.org/~esr/writings/taoup/html/ch01s06.html). Grep does one thing and does it well. If you desire additional functionality, you should add another utility to accomplish what you want.\n
\n
> rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
\n
In your specific task, utilize bashims to do *(what I think)* you want:\n
\n
`rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ || echo “task failed”`
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704161174 {#4033
date: 2024-01-02 03:06:14.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#3984 …}
+nested: Doctrine\ORM\PersistentCollection {#3977 …}
+votes: Doctrine\ORM\PersistentCollection {#3974 …}
+reports: Doctrine\ORM\PersistentCollection {#3972 …}
+favourites: Doctrine\ORM\PersistentCollection {#3969 …}
+notifications: Doctrine\ORM\PersistentCollection {#3967 …}
-id: 272109
-bodyTs: "'/home':40,64 '/~esr/writings/taoup/html/ch01s06.html).':10 'accomplish':30 'add':26 'addit':22 'anoth':27 'backupdir':42,66 'bashim':50 'deni':44 'desir':21 'echo':67 'exclud':37,61 'exclude-from':36,60 'fail':69 'function':23 'goe':3 'grep':11,43 'nap':35,59 'one':13 'philosophi':7 'request':2 'rsync':34,58 'rsync-homedir-local.txt':39,63 'specif':47 'task':48,68 'thing':14 'think':55 'unix':6 'user':41,65 'util':28,49 'want':33,57 'well':18 'www.catb.org':9 'www.catb.org/~esr/writings/taoup/html/ch01s06.html).':8"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1925030"
+editedAt: DateTimeImmutable @1710644447 {#4035
date: 2024-03-17 04:00:47.0 +01:00
}
+createdAt: DateTimeImmutable @1704161174 {#4039
date: 2024-01-02 03:06:14.0 +01:00
}
} |
|
Show voter details
|
| 13 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 14 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4049
+user: App\Entity\User {#4104 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I daresay there’s a way to do something like this with [fzf](https://github.com/junegunn/fzf)"
+lang: "en"
+isAdult: false
+favouriteCount: 8
+score: 0
+lastActive: DateTime @1704150351 {#4054
date: 2024-01-02 00:05:51.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4048 …}
+nested: Doctrine\ORM\PersistentCollection {#4046 …}
+votes: Doctrine\ORM\PersistentCollection {#4044 …}
+reports: Doctrine\ORM\PersistentCollection {#4042 …}
+favourites: Doctrine\ORM\PersistentCollection {#4101 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-id: 271991
-bodyTs: "'/junegunn/fzf)':16 'daresay':2 'fzf':13 'github.com':15 'github.com/junegunn/fzf)':14 'like':10 'someth':9 'way':6"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/6999931"
+editedAt: null
+createdAt: DateTimeImmutable @1704150351 {#4053
date: 2024-01-02 00:05:51.0 +01:00
}
} |
|
Show voter details
|
| 15 |
DENIED
|
edit
|
App\Entity\EntryComment {#4049
+user: App\Entity\User {#4104 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I daresay there’s a way to do something like this with [fzf](https://github.com/junegunn/fzf)"
+lang: "en"
+isAdult: false
+favouriteCount: 8
+score: 0
+lastActive: DateTime @1704150351 {#4054
date: 2024-01-02 00:05:51.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4048 …}
+nested: Doctrine\ORM\PersistentCollection {#4046 …}
+votes: Doctrine\ORM\PersistentCollection {#4044 …}
+reports: Doctrine\ORM\PersistentCollection {#4042 …}
+favourites: Doctrine\ORM\PersistentCollection {#4101 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-id: 271991
-bodyTs: "'/junegunn/fzf)':16 'daresay':2 'fzf':13 'github.com':15 'github.com/junegunn/fzf)':14 'like':10 'someth':9 'way':6"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/6999931"
+editedAt: null
+createdAt: DateTimeImmutable @1704150351 {#4053
date: 2024-01-02 00:05:51.0 +01:00
}
} |
|
Show voter details
|
| 16 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4049
+user: App\Entity\User {#4104 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I daresay there’s a way to do something like this with [fzf](https://github.com/junegunn/fzf)"
+lang: "en"
+isAdult: false
+favouriteCount: 8
+score: 0
+lastActive: DateTime @1704150351 {#4054
date: 2024-01-02 00:05:51.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4048 …}
+nested: Doctrine\ORM\PersistentCollection {#4046 …}
+votes: Doctrine\ORM\PersistentCollection {#4044 …}
+reports: Doctrine\ORM\PersistentCollection {#4042 …}
+favourites: Doctrine\ORM\PersistentCollection {#4101 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-id: 271991
-bodyTs: "'/junegunn/fzf)':16 'daresay':2 'fzf':13 'github.com':15 'github.com/junegunn/fzf)':14 'like':10 'someth':9 'way':6"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/6999931"
+editedAt: null
+createdAt: DateTimeImmutable @1704150351 {#4053
date: 2024-01-02 00:05:51.0 +01:00
}
} |
|
Show voter details
|
| 17 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 18 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
} |
|
Show voter details
|
| 19 |
DENIED
|
edit
|
App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
} |
|
Show voter details
|
| 20 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
} |
|
Show voter details
|
| 21 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 22 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
} |
|
Show voter details
|
| 23 |
DENIED
|
edit
|
App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
} |
|
Show voter details
|
| 24 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
} |
|
Show voter details
|
| 25 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 26 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4693
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: """
Sorry for th slow answer, I’ve been away. There is a way, if it’s still useful to you:\n
\n
First, create a named fifo, you only need to do this once:\n
\n
```\n
\n
<span style="color:#323232;">mkfifo logview\n
</span>\n
```\n
\n
Run your rsync in one pane, with a filtered view in the second:\n
\n
```\n
\n
<span style="color:#323232;">tmux new 'rsync ...options... |& tee logview' ; split-window -h 'grep "denied" logview'\n
</span>\n
```\n
\n
Replace `…options…` with your normal rsync command line.\n
\n
That should give you a split view, with all the normal messages on the left, and only messages containing ‘denied’ on the right.\n
\n
The `|&` makes sure we capture both stdout and stderr, `tee` then writes them to the fifo and displays them. `split-window` tells tmux to create a second pane, and display the output of grep.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704760600 {#4691
date: 2024-01-09 01:36:40.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4694 …}
+nested: Doctrine\ORM\PersistentCollection {#4696 …}
+votes: Doctrine\ORM\PersistentCollection {#4698 …}
+reports: Doctrine\ORM\PersistentCollection {#4700 …}
+favourites: Doctrine\ORM\PersistentCollection {#4702 …}
+notifications: Doctrine\ORM\PersistentCollection {#4704 …}
-id: 292359
-bodyTs: "'answer':5 'away':9 'captur':96 'command':67 'contain':87 'creat':22,117 'deni':59,88 'display':109,122 'fifo':25,107 'filter':43 'first':21 'give':71 'grep':58,126 'h':57 'left':83 'line':68 'logview':34,53,60 'make':93 'messag':80,86 'mkfifo':33 'name':24 'need':28 'new':49 'normal':65,79 'one':39 'option':51,62 'output':124 'pane':40,120 'replac':61 'right':91 'rsync':37,50,66 'run':35 'second':47,119 'slow':4 'sorri':1 'split':55,74,112 'split-window':54,111 'stderr':100 'stdout':98 'still':17 'sure':94 'tee':52,101 'tell':114 'th':3 'tmux':48,115 'use':18 've':7 'view':44,75 'way':13 'window':56,113 'write':103"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/8044042"
+editedAt: null
+createdAt: DateTimeImmutable @1704760600 {#4692
date: 2024-01-09 01:36:40.0 +01:00
}
} |
|
Show voter details
|
| 27 |
DENIED
|
edit
|
App\Entity\EntryComment {#4693
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: """
Sorry for th slow answer, I’ve been away. There is a way, if it’s still useful to you:\n
\n
First, create a named fifo, you only need to do this once:\n
\n
```\n
\n
<span style="color:#323232;">mkfifo logview\n
</span>\n
```\n
\n
Run your rsync in one pane, with a filtered view in the second:\n
\n
```\n
\n
<span style="color:#323232;">tmux new 'rsync ...options... |& tee logview' ; split-window -h 'grep "denied" logview'\n
</span>\n
```\n
\n
Replace `…options…` with your normal rsync command line.\n
\n
That should give you a split view, with all the normal messages on the left, and only messages containing ‘denied’ on the right.\n
\n
The `|&` makes sure we capture both stdout and stderr, `tee` then writes them to the fifo and displays them. `split-window` tells tmux to create a second pane, and display the output of grep.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704760600 {#4691
date: 2024-01-09 01:36:40.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4694 …}
+nested: Doctrine\ORM\PersistentCollection {#4696 …}
+votes: Doctrine\ORM\PersistentCollection {#4698 …}
+reports: Doctrine\ORM\PersistentCollection {#4700 …}
+favourites: Doctrine\ORM\PersistentCollection {#4702 …}
+notifications: Doctrine\ORM\PersistentCollection {#4704 …}
-id: 292359
-bodyTs: "'answer':5 'away':9 'captur':96 'command':67 'contain':87 'creat':22,117 'deni':59,88 'display':109,122 'fifo':25,107 'filter':43 'first':21 'give':71 'grep':58,126 'h':57 'left':83 'line':68 'logview':34,53,60 'make':93 'messag':80,86 'mkfifo':33 'name':24 'need':28 'new':49 'normal':65,79 'one':39 'option':51,62 'output':124 'pane':40,120 'replac':61 'right':91 'rsync':37,50,66 'run':35 'second':47,119 'slow':4 'sorri':1 'split':55,74,112 'split-window':54,111 'stderr':100 'stdout':98 'still':17 'sure':94 'tee':52,101 'tell':114 'th':3 'tmux':48,115 'use':18 've':7 'view':44,75 'way':13 'window':56,113 'write':103"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/8044042"
+editedAt: null
+createdAt: DateTimeImmutable @1704760600 {#4692
date: 2024-01-09 01:36:40.0 +01:00
}
} |
|
Show voter details
|
| 28 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4693
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: """
Sorry for th slow answer, I’ve been away. There is a way, if it’s still useful to you:\n
\n
First, create a named fifo, you only need to do this once:\n
\n
```\n
\n
<span style="color:#323232;">mkfifo logview\n
</span>\n
```\n
\n
Run your rsync in one pane, with a filtered view in the second:\n
\n
```\n
\n
<span style="color:#323232;">tmux new 'rsync ...options... |& tee logview' ; split-window -h 'grep "denied" logview'\n
</span>\n
```\n
\n
Replace `…options…` with your normal rsync command line.\n
\n
That should give you a split view, with all the normal messages on the left, and only messages containing ‘denied’ on the right.\n
\n
The `|&` makes sure we capture both stdout and stderr, `tee` then writes them to the fifo and displays them. `split-window` tells tmux to create a second pane, and display the output of grep.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704760600 {#4691
date: 2024-01-09 01:36:40.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4694 …}
+nested: Doctrine\ORM\PersistentCollection {#4696 …}
+votes: Doctrine\ORM\PersistentCollection {#4698 …}
+reports: Doctrine\ORM\PersistentCollection {#4700 …}
+favourites: Doctrine\ORM\PersistentCollection {#4702 …}
+notifications: Doctrine\ORM\PersistentCollection {#4704 …}
-id: 292359
-bodyTs: "'answer':5 'away':9 'captur':96 'command':67 'contain':87 'creat':22,117 'deni':59,88 'display':109,122 'fifo':25,107 'filter':43 'first':21 'give':71 'grep':58,126 'h':57 'left':83 'line':68 'logview':34,53,60 'make':93 'messag':80,86 'mkfifo':33 'name':24 'need':28 'new':49 'normal':65,79 'one':39 'option':51,62 'output':124 'pane':40,120 'replac':61 'right':91 'rsync':37,50,66 'run':35 'second':47,119 'slow':4 'sorri':1 'split':55,74,112 'split-window':54,111 'stderr':100 'stdout':98 'still':17 'sure':94 'tee':52,101 'tell':114 'th':3 'tmux':48,115 'use':18 've':7 'view':44,75 'way':13 'window':56,113 'write':103"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/8044042"
+editedAt: null
+createdAt: DateTimeImmutable @1704760600 {#4692
date: 2024-01-09 01:36:40.0 +01:00
}
} |
|
Show voter details
|
| 29 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 30 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4745
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4693
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: """
Sorry for th slow answer, I’ve been away. There is a way, if it’s still useful to you:\n
\n
First, create a named fifo, you only need to do this once:\n
\n
```\n
\n
<span style="color:#323232;">mkfifo logview\n
</span>\n
```\n
\n
Run your rsync in one pane, with a filtered view in the second:\n
\n
```\n
\n
<span style="color:#323232;">tmux new 'rsync ...options... |& tee logview' ; split-window -h 'grep "denied" logview'\n
</span>\n
```\n
\n
Replace `…options…` with your normal rsync command line.\n
\n
That should give you a split view, with all the normal messages on the left, and only messages containing ‘denied’ on the right.\n
\n
The `|&` makes sure we capture both stdout and stderr, `tee` then writes them to the fifo and displays them. `split-window` tells tmux to create a second pane, and display the output of grep.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704760600 {#4691
date: 2024-01-09 01:36:40.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4694 …}
+nested: Doctrine\ORM\PersistentCollection {#4696 …}
+votes: Doctrine\ORM\PersistentCollection {#4698 …}
+reports: Doctrine\ORM\PersistentCollection {#4700 …}
+favourites: Doctrine\ORM\PersistentCollection {#4702 …}
+notifications: Doctrine\ORM\PersistentCollection {#4704 …}
-id: 292359
-bodyTs: "'answer':5 'away':9 'captur':96 'command':67 'contain':87 'creat':22,117 'deni':59,88 'display':109,122 'fifo':25,107 'filter':43 'first':21 'give':71 'grep':58,126 'h':57 'left':83 'line':68 'logview':34,53,60 'make':93 'messag':80,86 'mkfifo':33 'name':24 'need':28 'new':49 'normal':65,79 'one':39 'option':51,62 'output':124 'pane':40,120 'replac':61 'right':91 'rsync':37,50,66 'run':35 'second':47,119 'slow':4 'sorri':1 'split':55,74,112 'split-window':54,111 'stderr':100 'stdout':98 'still':17 'sure':94 'tee':52,101 'tell':114 'th':3 'tmux':48,115 'use':18 've':7 'view':44,75 'way':13 'window':56,113 'write':103"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/8044042"
+editedAt: null
+createdAt: DateTimeImmutable @1704760600 {#4692
date: 2024-01-09 01:36:40.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704779147 {#4743
date: 2024-01-09 06:45:47.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4746 …}
+nested: Doctrine\ORM\PersistentCollection {#4748 …}
+votes: Doctrine\ORM\PersistentCollection {#4750 …}
+reports: Doctrine\ORM\PersistentCollection {#4752 …}
+favourites: Doctrine\ORM\PersistentCollection {#4754 …}
+notifications: Doctrine\ORM\PersistentCollection {#4756 …}
-id: 292843
-bodyTs: "'thank':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/6182599"
+editedAt: null
+createdAt: DateTimeImmutable @1704779147 {#4744
date: 2024-01-09 06:45:47.0 +01:00
}
} |
|
Show voter details
|
| 31 |
DENIED
|
edit
|
App\Entity\EntryComment {#4745
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4693
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: """
Sorry for th slow answer, I’ve been away. There is a way, if it’s still useful to you:\n
\n
First, create a named fifo, you only need to do this once:\n
\n
```\n
\n
<span style="color:#323232;">mkfifo logview\n
</span>\n
```\n
\n
Run your rsync in one pane, with a filtered view in the second:\n
\n
```\n
\n
<span style="color:#323232;">tmux new 'rsync ...options... |& tee logview' ; split-window -h 'grep "denied" logview'\n
</span>\n
```\n
\n
Replace `…options…` with your normal rsync command line.\n
\n
That should give you a split view, with all the normal messages on the left, and only messages containing ‘denied’ on the right.\n
\n
The `|&` makes sure we capture both stdout and stderr, `tee` then writes them to the fifo and displays them. `split-window` tells tmux to create a second pane, and display the output of grep.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704760600 {#4691
date: 2024-01-09 01:36:40.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4694 …}
+nested: Doctrine\ORM\PersistentCollection {#4696 …}
+votes: Doctrine\ORM\PersistentCollection {#4698 …}
+reports: Doctrine\ORM\PersistentCollection {#4700 …}
+favourites: Doctrine\ORM\PersistentCollection {#4702 …}
+notifications: Doctrine\ORM\PersistentCollection {#4704 …}
-id: 292359
-bodyTs: "'answer':5 'away':9 'captur':96 'command':67 'contain':87 'creat':22,117 'deni':59,88 'display':109,122 'fifo':25,107 'filter':43 'first':21 'give':71 'grep':58,126 'h':57 'left':83 'line':68 'logview':34,53,60 'make':93 'messag':80,86 'mkfifo':33 'name':24 'need':28 'new':49 'normal':65,79 'one':39 'option':51,62 'output':124 'pane':40,120 'replac':61 'right':91 'rsync':37,50,66 'run':35 'second':47,119 'slow':4 'sorri':1 'split':55,74,112 'split-window':54,111 'stderr':100 'stdout':98 'still':17 'sure':94 'tee':52,101 'tell':114 'th':3 'tmux':48,115 'use':18 've':7 'view':44,75 'way':13 'window':56,113 'write':103"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/8044042"
+editedAt: null
+createdAt: DateTimeImmutable @1704760600 {#4692
date: 2024-01-09 01:36:40.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704779147 {#4743
date: 2024-01-09 06:45:47.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4746 …}
+nested: Doctrine\ORM\PersistentCollection {#4748 …}
+votes: Doctrine\ORM\PersistentCollection {#4750 …}
+reports: Doctrine\ORM\PersistentCollection {#4752 …}
+favourites: Doctrine\ORM\PersistentCollection {#4754 …}
+notifications: Doctrine\ORM\PersistentCollection {#4756 …}
-id: 292843
-bodyTs: "'thank':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/6182599"
+editedAt: null
+createdAt: DateTimeImmutable @1704779147 {#4744
date: 2024-01-09 06:45:47.0 +01:00
}
} |
|
Show voter details
|
| 32 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4745
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4693
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4638
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4164
+user: App\Entity\User {#4177 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Tmux is a very helpful terminal multiplexer, meaning it can split your terminal into multiple panes. So, create two side by side panes, then one way of doing it is:\n
\n
- on the left, run `your cmd | tee >(grep ‘denied’ > error.log)`\n
- on the right, run `tail -f error.log`\n
\n
The `tee` process takes it’s standard in, and writes itbto both standard out, so you see all the lines, and the path it’s been given. The `>(…)` operator runs the grep in a subprocess, and returns the path to it’s standard input pipe, so `grep` receives every line, and writes the denied lines to a log file which you display with `tail` in the other pane.\n
\n
Rather than using a file for error.log you could also use a named pipe in much the same way.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 24
+score: 0
+lastActive: DateTime @1719267028 {#4159
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4165 …}
+nested: Doctrine\ORM\PersistentCollection {#4167 …}
+votes: Doctrine\ORM\PersistentCollection {#4169 …}
+reports: Doctrine\ORM\PersistentCollection {#4171 …}
+favourites: Doctrine\ORM\PersistentCollection {#4173 …}
+notifications: Doctrine\ORM\PersistentCollection {#4175 …}
-id: 271986
-bodyTs: "'also':125 'cmd':36 'could':124 'creat':18 'deni':39,101 'display':109 'error.log':40,47,122 'everi':96 'f':46 'file':106,120 'given':74 'grep':38,79,94 'help':5 'input':91 'itbto':58 'left':33 'line':67,97,102 'log':105 'mean':8 'much':131 'multipl':15 'multiplex':7 'name':128 'one':25 'oper':76 'pane':16,23,115 'path':70,86 'pipe':92,129 'process':50 'rather':116 'receiv':95 'return':84 'right':43 'run':34,44,77 'see':64 'side':20,22 'split':11 'standard':54,60,90 'subprocess':82 'tail':45,111 'take':51 'tee':37,49 'termin':6,13 'tmux':1 'two':19 'use':118,126 'way':26,134 'write':57,99"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/7781917"
+editedAt: null
+createdAt: DateTimeImmutable @1704150112 {#4160
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks! I’m curious if there is a way to do this as a one-liner?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704163889 {#4636
date: 2024-01-02 03:51:29.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4639 …}
+nested: Doctrine\ORM\PersistentCollection {#4641 …}
+votes: Doctrine\ORM\PersistentCollection {#4643 …}
+reports: Doctrine\ORM\PersistentCollection {#4645 …}
+favourites: Doctrine\ORM\PersistentCollection {#4647 …}
+notifications: Doctrine\ORM\PersistentCollection {#4649 …}
-id: 272134
-bodyTs: "'curious':4 'liner':17 'm':3 'one':16 'one-lin':15 'thank':1 'way':9"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995294"
+editedAt: null
+createdAt: DateTimeImmutable @1704163889 {#4637
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: """
Sorry for th slow answer, I’ve been away. There is a way, if it’s still useful to you:\n
\n
First, create a named fifo, you only need to do this once:\n
\n
```\n
\n
<span style="color:#323232;">mkfifo logview\n
</span>\n
```\n
\n
Run your rsync in one pane, with a filtered view in the second:\n
\n
```\n
\n
<span style="color:#323232;">tmux new 'rsync ...options... |& tee logview' ; split-window -h 'grep "denied" logview'\n
</span>\n
```\n
\n
Replace `…options…` with your normal rsync command line.\n
\n
That should give you a split view, with all the normal messages on the left, and only messages containing ‘denied’ on the right.\n
\n
The `|&` makes sure we capture both stdout and stderr, `tee` then writes them to the fifo and displays them. `split-window` tells tmux to create a second pane, and display the output of grep.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704760600 {#4691
date: 2024-01-09 01:36:40.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4694 …}
+nested: Doctrine\ORM\PersistentCollection {#4696 …}
+votes: Doctrine\ORM\PersistentCollection {#4698 …}
+reports: Doctrine\ORM\PersistentCollection {#4700 …}
+favourites: Doctrine\ORM\PersistentCollection {#4702 …}
+notifications: Doctrine\ORM\PersistentCollection {#4704 …}
-id: 292359
-bodyTs: "'answer':5 'away':9 'captur':96 'command':67 'contain':87 'creat':22,117 'deni':59,88 'display':109,122 'fifo':25,107 'filter':43 'first':21 'give':71 'grep':58,126 'h':57 'left':83 'line':68 'logview':34,53,60 'make':93 'messag':80,86 'mkfifo':33 'name':24 'need':28 'new':49 'normal':65,79 'one':39 'option':51,62 'output':124 'pane':40,120 'replac':61 'right':91 'rsync':37,50,66 'run':35 'second':47,119 'slow':4 'sorri':1 'split':55,74,112 'split-window':54,111 'stderr':100 'stdout':98 'still':17 'sure':94 'tee':52,101 'tell':114 'th':3 'tmux':48,115 'use':18 've':7 'view':44,75 'way':13 'window':56,113 'write':103"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemm.ee/comment/8044042"
+editedAt: null
+createdAt: DateTimeImmutable @1704760600 {#4692
date: 2024-01-09 01:36:40.0 +01:00
}
}
+root: App\Entity\EntryComment {#4164}
+body: "Thanks!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704779147 {#4743
date: 2024-01-09 06:45:47.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@notabot@lemm.ee"
]
+children: Doctrine\ORM\PersistentCollection {#4746 …}
+nested: Doctrine\ORM\PersistentCollection {#4748 …}
+votes: Doctrine\ORM\PersistentCollection {#4750 …}
+reports: Doctrine\ORM\PersistentCollection {#4752 …}
+favourites: Doctrine\ORM\PersistentCollection {#4754 …}
+notifications: Doctrine\ORM\PersistentCollection {#4756 …}
-id: 292843
-bodyTs: "'thank':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/6182599"
+editedAt: null
+createdAt: DateTimeImmutable @1704779147 {#4744
date: 2024-01-09 06:45:47.0 +01:00
}
} |
|
Show voter details
|
| 33 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 34 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4238
+user: App\Entity\User {#4251 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Funnily enough Astrogrep on Windows is great for this"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150026 {#4232
date: 2024-01-02 00:00:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4239 …}
+nested: Doctrine\ORM\PersistentCollection {#4241 …}
+votes: Doctrine\ORM\PersistentCollection {#4243 …}
+reports: Doctrine\ORM\PersistentCollection {#4245 …}
+favourites: Doctrine\ORM\PersistentCollection {#4247 …}
+notifications: Doctrine\ORM\PersistentCollection {#4249 …}
-id: 271984
-bodyTs: "'astrogrep':3 'enough':2 'funnili':1 'great':7 'window':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/6340165"
+editedAt: DateTimeImmutable @1710631184 {#4233
date: 2024-03-17 00:19:44.0 +01:00
}
+createdAt: DateTimeImmutable @1704150026 {#4234
date: 2024-01-02 00:00:26.0 +01:00
}
} |
|
Show voter details
|
| 35 |
DENIED
|
edit
|
App\Entity\EntryComment {#4238
+user: App\Entity\User {#4251 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Funnily enough Astrogrep on Windows is great for this"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150026 {#4232
date: 2024-01-02 00:00:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4239 …}
+nested: Doctrine\ORM\PersistentCollection {#4241 …}
+votes: Doctrine\ORM\PersistentCollection {#4243 …}
+reports: Doctrine\ORM\PersistentCollection {#4245 …}
+favourites: Doctrine\ORM\PersistentCollection {#4247 …}
+notifications: Doctrine\ORM\PersistentCollection {#4249 …}
-id: 271984
-bodyTs: "'astrogrep':3 'enough':2 'funnili':1 'great':7 'window':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/6340165"
+editedAt: DateTimeImmutable @1710631184 {#4233
date: 2024-03-17 00:19:44.0 +01:00
}
+createdAt: DateTimeImmutable @1704150026 {#4234
date: 2024-01-02 00:00:26.0 +01:00
}
} |
|
Show voter details
|
| 36 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4238
+user: App\Entity\User {#4251 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Funnily enough Astrogrep on Windows is great for this"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150026 {#4232
date: 2024-01-02 00:00:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4239 …}
+nested: Doctrine\ORM\PersistentCollection {#4241 …}
+votes: Doctrine\ORM\PersistentCollection {#4243 …}
+reports: Doctrine\ORM\PersistentCollection {#4245 …}
+favourites: Doctrine\ORM\PersistentCollection {#4247 …}
+notifications: Doctrine\ORM\PersistentCollection {#4249 …}
-id: 271984
-bodyTs: "'astrogrep':3 'enough':2 'funnili':1 'great':7 'window':5"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/6340165"
+editedAt: DateTimeImmutable @1710631184 {#4233
date: 2024-03-17 00:19:44.0 +01:00
}
+createdAt: DateTimeImmutable @1704150026 {#4234
date: 2024-01-02 00:00:26.0 +01:00
}
} |
|
Show voter details
|
| 37 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 38 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4312
+user: App\Entity\User {#4325 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Couldn’t you just check the rsync exit codes? `echo $?` check if both return 0?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704141124 {#4307
date: 2024-01-01 21:32:04.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4313 …}
+nested: Doctrine\ORM\PersistentCollection {#4315 …}
+votes: Doctrine\ORM\PersistentCollection {#4317 …}
+reports: Doctrine\ORM\PersistentCollection {#4319 …}
+favourites: Doctrine\ORM\PersistentCollection {#4321 …}
+notifications: Doctrine\ORM\PersistentCollection {#4323 …}
-id: 287091
-bodyTs: "'0':15 'check':5,11 'code':9 'couldn':1 'echo':10 'exit':8 'return':14 'rsync':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/6054560"
+editedAt: null
+createdAt: DateTimeImmutable @1704141124 {#4308
date: 2024-01-01 21:32:04.0 +01:00
}
} |
|
Show voter details
|
| 39 |
DENIED
|
edit
|
App\Entity\EntryComment {#4312
+user: App\Entity\User {#4325 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Couldn’t you just check the rsync exit codes? `echo $?` check if both return 0?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704141124 {#4307
date: 2024-01-01 21:32:04.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4313 …}
+nested: Doctrine\ORM\PersistentCollection {#4315 …}
+votes: Doctrine\ORM\PersistentCollection {#4317 …}
+reports: Doctrine\ORM\PersistentCollection {#4319 …}
+favourites: Doctrine\ORM\PersistentCollection {#4321 …}
+notifications: Doctrine\ORM\PersistentCollection {#4323 …}
-id: 287091
-bodyTs: "'0':15 'check':5,11 'code':9 'couldn':1 'echo':10 'exit':8 'return':14 'rsync':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/6054560"
+editedAt: null
+createdAt: DateTimeImmutable @1704141124 {#4308
date: 2024-01-01 21:32:04.0 +01:00
}
} |
|
Show voter details
|
| 40 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4312
+user: App\Entity\User {#4325 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Couldn’t you just check the rsync exit codes? `echo $?` check if both return 0?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704141124 {#4307
date: 2024-01-01 21:32:04.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4313 …}
+nested: Doctrine\ORM\PersistentCollection {#4315 …}
+votes: Doctrine\ORM\PersistentCollection {#4317 …}
+reports: Doctrine\ORM\PersistentCollection {#4319 …}
+favourites: Doctrine\ORM\PersistentCollection {#4321 …}
+notifications: Doctrine\ORM\PersistentCollection {#4323 …}
-id: 287091
-bodyTs: "'0':15 'check':5,11 'code':9 'couldn':1 'echo':10 'exit':8 'return':14 'rsync':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/6054560"
+editedAt: null
+createdAt: DateTimeImmutable @1704141124 {#4308
date: 2024-01-01 21:32:04.0 +01:00
}
} |
|
Show voter details
|
| 41 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 42 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
} |
|
Show voter details
|
| 43 |
DENIED
|
edit
|
App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
} |
|
Show voter details
|
| 44 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
} |
|
Show voter details
|
| 45 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 46 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
} |
|
Show voter details
|
| 47 |
DENIED
|
edit
|
App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
} |
|
Show voter details
|
| 48 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
} |
|
Show voter details
|
| 49 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 50 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4656
+user: Proxies\__CG__\App\Entity\User {#4660 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "More info: / only searches from cursor to end of file. ? searches from cursor to start of file."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150415 {#4655
date: 2024-01-02 00:06:55.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4665 …}
+nested: Doctrine\ORM\PersistentCollection {#4661 …}
+votes: Doctrine\ORM\PersistentCollection {#4663 …}
+reports: Doctrine\ORM\PersistentCollection {#4668 …}
+favourites: Doctrine\ORM\PersistentCollection {#4670 …}
+notifications: Doctrine\ORM\PersistentCollection {#4672 …}
-id: 271994
-bodyTs: "'cursor':6,13 'end':8 'file':10,17 'info':2 'search':4,11 'start':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5992348"
+editedAt: null
+createdAt: DateTimeImmutable @1704150415 {#4652
date: 2024-01-02 00:06:55.0 +01:00
}
} |
|
Show voter details
|
| 51 |
DENIED
|
edit
|
App\Entity\EntryComment {#4656
+user: Proxies\__CG__\App\Entity\User {#4660 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "More info: / only searches from cursor to end of file. ? searches from cursor to start of file."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150415 {#4655
date: 2024-01-02 00:06:55.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4665 …}
+nested: Doctrine\ORM\PersistentCollection {#4661 …}
+votes: Doctrine\ORM\PersistentCollection {#4663 …}
+reports: Doctrine\ORM\PersistentCollection {#4668 …}
+favourites: Doctrine\ORM\PersistentCollection {#4670 …}
+notifications: Doctrine\ORM\PersistentCollection {#4672 …}
-id: 271994
-bodyTs: "'cursor':6,13 'end':8 'file':10,17 'info':2 'search':4,11 'start':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5992348"
+editedAt: null
+createdAt: DateTimeImmutable @1704150415 {#4652
date: 2024-01-02 00:06:55.0 +01:00
}
} |
|
Show voter details
|
| 52 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4656
+user: Proxies\__CG__\App\Entity\User {#4660 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "More info: / only searches from cursor to end of file. ? searches from cursor to start of file."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150415 {#4655
date: 2024-01-02 00:06:55.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4665 …}
+nested: Doctrine\ORM\PersistentCollection {#4661 …}
+votes: Doctrine\ORM\PersistentCollection {#4663 …}
+reports: Doctrine\ORM\PersistentCollection {#4668 …}
+favourites: Doctrine\ORM\PersistentCollection {#4670 …}
+notifications: Doctrine\ORM\PersistentCollection {#4672 …}
-id: 271994
-bodyTs: "'cursor':6,13 'end':8 'file':10,17 'info':2 'search':4,11 'start':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5992348"
+editedAt: null
+createdAt: DateTimeImmutable @1704150415 {#4652
date: 2024-01-02 00:06:55.0 +01:00
}
} |
|
Show voter details
|
| 53 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 54 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4716
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4656
+user: Proxies\__CG__\App\Entity\User {#4660 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "More info: / only searches from cursor to end of file. ? searches from cursor to start of file."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150415 {#4655
date: 2024-01-02 00:06:55.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4665 …}
+nested: Doctrine\ORM\PersistentCollection {#4661 …}
+votes: Doctrine\ORM\PersistentCollection {#4663 …}
+reports: Doctrine\ORM\PersistentCollection {#4668 …}
+favourites: Doctrine\ORM\PersistentCollection {#4670 …}
+notifications: Doctrine\ORM\PersistentCollection {#4672 …}
-id: 271994
-bodyTs: "'cursor':6,13 'end':8 'file':10,17 'info':2 'search':4,11 'start':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5992348"
+editedAt: null
+createdAt: DateTimeImmutable @1704150415 {#4652
date: 2024-01-02 00:06:55.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "Oops yeah I just edited my comment, put the wrong symbol!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704169459 {#4717
date: 2024-01-02 05:24:19.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@caseyweederman@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4713 …}
+nested: Doctrine\ORM\PersistentCollection {#4709 …}
+votes: Doctrine\ORM\PersistentCollection {#4707 …}
+reports: Doctrine\ORM\PersistentCollection {#4722 …}
+favourites: Doctrine\ORM\PersistentCollection {#4724 …}
+notifications: Doctrine\ORM\PersistentCollection {#4726 …}
-id: 272251
-bodyTs: "'comment':7 'edit':5 'oop':1 'put':8 'symbol':11 'wrong':10 'yeah':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6996656"
+editedAt: null
+createdAt: DateTimeImmutable @1704169459 {#4720
date: 2024-01-02 05:24:19.0 +01:00
}
} |
|
Show voter details
|
| 55 |
DENIED
|
edit
|
App\Entity\EntryComment {#4716
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4656
+user: Proxies\__CG__\App\Entity\User {#4660 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "More info: / only searches from cursor to end of file. ? searches from cursor to start of file."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150415 {#4655
date: 2024-01-02 00:06:55.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4665 …}
+nested: Doctrine\ORM\PersistentCollection {#4661 …}
+votes: Doctrine\ORM\PersistentCollection {#4663 …}
+reports: Doctrine\ORM\PersistentCollection {#4668 …}
+favourites: Doctrine\ORM\PersistentCollection {#4670 …}
+notifications: Doctrine\ORM\PersistentCollection {#4672 …}
-id: 271994
-bodyTs: "'cursor':6,13 'end':8 'file':10,17 'info':2 'search':4,11 'start':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5992348"
+editedAt: null
+createdAt: DateTimeImmutable @1704150415 {#4652
date: 2024-01-02 00:06:55.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "Oops yeah I just edited my comment, put the wrong symbol!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704169459 {#4717
date: 2024-01-02 05:24:19.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@caseyweederman@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4713 …}
+nested: Doctrine\ORM\PersistentCollection {#4709 …}
+votes: Doctrine\ORM\PersistentCollection {#4707 …}
+reports: Doctrine\ORM\PersistentCollection {#4722 …}
+favourites: Doctrine\ORM\PersistentCollection {#4724 …}
+notifications: Doctrine\ORM\PersistentCollection {#4726 …}
-id: 272251
-bodyTs: "'comment':7 'edit':5 'oop':1 'put':8 'symbol':11 'wrong':10 'yeah':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6996656"
+editedAt: null
+createdAt: DateTimeImmutable @1704169459 {#4720
date: 2024-01-02 05:24:19.0 +01:00
}
} |
|
Show voter details
|
| 56 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4716
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4656
+user: Proxies\__CG__\App\Entity\User {#4660 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "More info: / only searches from cursor to end of file. ? searches from cursor to start of file."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704150415 {#4655
date: 2024-01-02 00:06:55.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4665 …}
+nested: Doctrine\ORM\PersistentCollection {#4661 …}
+votes: Doctrine\ORM\PersistentCollection {#4663 …}
+reports: Doctrine\ORM\PersistentCollection {#4668 …}
+favourites: Doctrine\ORM\PersistentCollection {#4670 …}
+notifications: Doctrine\ORM\PersistentCollection {#4672 …}
-id: 271994
-bodyTs: "'cursor':6,13 'end':8 'file':10,17 'info':2 'search':4,11 'start':15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5992348"
+editedAt: null
+createdAt: DateTimeImmutable @1704150415 {#4652
date: 2024-01-02 00:06:55.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "Oops yeah I just edited my comment, put the wrong symbol!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704169459 {#4717
date: 2024-01-02 05:24:19.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@caseyweederman@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4713 …}
+nested: Doctrine\ORM\PersistentCollection {#4709 …}
+votes: Doctrine\ORM\PersistentCollection {#4707 …}
+reports: Doctrine\ORM\PersistentCollection {#4722 …}
+favourites: Doctrine\ORM\PersistentCollection {#4724 …}
+notifications: Doctrine\ORM\PersistentCollection {#4726 …}
-id: 272251
-bodyTs: "'comment':7 'edit':5 'oop':1 'put':8 'symbol':11 'wrong':10 'yeah':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6996656"
+editedAt: null
+createdAt: DateTimeImmutable @1704169459 {#4720
date: 2024-01-02 05:24:19.0 +01:00
}
} |
|
Show voter details
|
| 57 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 58 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4677
+user: Proxies\__CG__\App\Entity\User {#4678 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "That’s not at all grep-like. Grep is a line filter, not a character sequence highlighter."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704168242 {#4674
date: 2024-01-02 05:04:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4679 …}
+nested: Doctrine\ORM\PersistentCollection {#4681 …}
+votes: Doctrine\ORM\PersistentCollection {#4683 …}
+reports: Doctrine\ORM\PersistentCollection {#4685 …}
+favourites: Doctrine\ORM\PersistentCollection {#4687 …}
+notifications: Doctrine\ORM\PersistentCollection {#4689 …}
-id: 272216
-bodyTs: "'charact':16 'filter':13 'grep':7,9 'grep-lik':6 'highlight':18 'like':8 'line':12 'sequenc':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7003983"
+editedAt: DateTimeImmutable @1710660465 {#4675
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4676
date: 2024-01-02 05:04:02.0 +01:00
}
} |
|
Show voter details
|
| 59 |
DENIED
|
edit
|
App\Entity\EntryComment {#4677
+user: Proxies\__CG__\App\Entity\User {#4678 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "That’s not at all grep-like. Grep is a line filter, not a character sequence highlighter."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704168242 {#4674
date: 2024-01-02 05:04:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4679 …}
+nested: Doctrine\ORM\PersistentCollection {#4681 …}
+votes: Doctrine\ORM\PersistentCollection {#4683 …}
+reports: Doctrine\ORM\PersistentCollection {#4685 …}
+favourites: Doctrine\ORM\PersistentCollection {#4687 …}
+notifications: Doctrine\ORM\PersistentCollection {#4689 …}
-id: 272216
-bodyTs: "'charact':16 'filter':13 'grep':7,9 'grep-lik':6 'highlight':18 'like':8 'line':12 'sequenc':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7003983"
+editedAt: DateTimeImmutable @1710660465 {#4675
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4676
date: 2024-01-02 05:04:02.0 +01:00
}
} |
|
Show voter details
|
| 60 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4677
+user: Proxies\__CG__\App\Entity\User {#4678 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "That’s not at all grep-like. Grep is a line filter, not a character sequence highlighter."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704168242 {#4674
date: 2024-01-02 05:04:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4679 …}
+nested: Doctrine\ORM\PersistentCollection {#4681 …}
+votes: Doctrine\ORM\PersistentCollection {#4683 …}
+reports: Doctrine\ORM\PersistentCollection {#4685 …}
+favourites: Doctrine\ORM\PersistentCollection {#4687 …}
+notifications: Doctrine\ORM\PersistentCollection {#4689 …}
-id: 272216
-bodyTs: "'charact':16 'filter':13 'grep':7,9 'grep-lik':6 'highlight':18 'like':8 'line':12 'sequenc':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7003983"
+editedAt: DateTimeImmutable @1710660465 {#4675
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4676
date: 2024-01-02 05:04:02.0 +01:00
}
} |
|
Show voter details
|
| 61 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 62 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4730
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4677
+user: Proxies\__CG__\App\Entity\User {#4678 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "That’s not at all grep-like. Grep is a line filter, not a character sequence highlighter."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704168242 {#4674
date: 2024-01-02 05:04:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4679 …}
+nested: Doctrine\ORM\PersistentCollection {#4681 …}
+votes: Doctrine\ORM\PersistentCollection {#4683 …}
+reports: Doctrine\ORM\PersistentCollection {#4685 …}
+favourites: Doctrine\ORM\PersistentCollection {#4687 …}
+notifications: Doctrine\ORM\PersistentCollection {#4689 …}
-id: 272216
-bodyTs: "'charact':16 'filter':13 'grep':7,9 'grep-lik':6 'highlight':18 'like':8 'line':12 'sequenc':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7003983"
+editedAt: DateTimeImmutable @1710660465 {#4675
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4676
date: 2024-01-02 05:04:02.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "Oops sorry it’s `&`! `/` is find"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704169378 {#4728
date: 2024-01-02 05:22:58.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@Atemu@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4731 …}
+nested: Doctrine\ORM\PersistentCollection {#4733 …}
+votes: Doctrine\ORM\PersistentCollection {#4735 …}
+reports: Doctrine\ORM\PersistentCollection {#4737 …}
+favourites: Doctrine\ORM\PersistentCollection {#4739 …}
+notifications: Doctrine\ORM\PersistentCollection {#4741 …}
-id: 272248
-bodyTs: "'find':6 'oop':1 'sorri':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6996644"
+editedAt: null
+createdAt: DateTimeImmutable @1704169378 {#4729
date: 2024-01-02 05:22:58.0 +01:00
}
} |
|
Show voter details
|
| 63 |
DENIED
|
edit
|
App\Entity\EntryComment {#4730
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4677
+user: Proxies\__CG__\App\Entity\User {#4678 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "That’s not at all grep-like. Grep is a line filter, not a character sequence highlighter."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704168242 {#4674
date: 2024-01-02 05:04:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4679 …}
+nested: Doctrine\ORM\PersistentCollection {#4681 …}
+votes: Doctrine\ORM\PersistentCollection {#4683 …}
+reports: Doctrine\ORM\PersistentCollection {#4685 …}
+favourites: Doctrine\ORM\PersistentCollection {#4687 …}
+notifications: Doctrine\ORM\PersistentCollection {#4689 …}
-id: 272216
-bodyTs: "'charact':16 'filter':13 'grep':7,9 'grep-lik':6 'highlight':18 'like':8 'line':12 'sequenc':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7003983"
+editedAt: DateTimeImmutable @1710660465 {#4675
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4676
date: 2024-01-02 05:04:02.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "Oops sorry it’s `&`! `/` is find"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704169378 {#4728
date: 2024-01-02 05:22:58.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@Atemu@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4731 …}
+nested: Doctrine\ORM\PersistentCollection {#4733 …}
+votes: Doctrine\ORM\PersistentCollection {#4735 …}
+reports: Doctrine\ORM\PersistentCollection {#4737 …}
+favourites: Doctrine\ORM\PersistentCollection {#4739 …}
+notifications: Doctrine\ORM\PersistentCollection {#4741 …}
-id: 272248
-bodyTs: "'find':6 'oop':1 'sorri':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6996644"
+editedAt: null
+createdAt: DateTimeImmutable @1704169378 {#4729
date: 2024-01-02 05:22:58.0 +01:00
}
} |
|
Show voter details
|
| 64 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4730
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4677
+user: Proxies\__CG__\App\Entity\User {#4678 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4622
+user: Proxies\__CG__\App\Entity\User {#4623 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4385
+user: App\Entity\User {#4398 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I usually solve this kind of problem by piping to `less` or a logfile and then just searching in there. You can get it to refresh new content by pressing the End key twice. Or maybe less just needs the `-f` flag or something similar. I’m too lazy to look it up."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710668296 {#4380
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4386 …}
+nested: Doctrine\ORM\PersistentCollection {#4388 …}
+votes: Doctrine\ORM\PersistentCollection {#4390 …}
+reports: Doctrine\ORM\PersistentCollection {#4392 …}
+favourites: Doctrine\ORM\PersistentCollection {#4394 …}
+notifications: Doctrine\ORM\PersistentCollection {#4396 …}
-id: 271722
-bodyTs: "'content':28 'end':32 'f':41 'flag':42 'get':23 'key':33 'kind':5 'lazi':49 'less':11,37 'logfil':14 'look':51 'm':47 'mayb':36 'need':39 'new':27 'pipe':9 'press':30 'problem':7 'refresh':26 'search':18 'similar':45 'solv':3 'someth':44 'twice':34 'usual':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://swg-empire.de/comment/1431608"
+editedAt: null
+createdAt: DateTimeImmutable @1704135737 {#4381
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: """
`less` can enter a grep-like mode by hitting `/`\n
\n
Edit: it’s `&` for the grep mode, `/` is search.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1704141260 {#4619
date: 2024-01-01 21:34:20.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
]
+children: Doctrine\ORM\PersistentCollection {#4624 …}
+nested: Doctrine\ORM\PersistentCollection {#4626 …}
+votes: Doctrine\ORM\PersistentCollection {#4628 …}
+reports: Doctrine\ORM\PersistentCollection {#4630 …}
+favourites: Doctrine\ORM\PersistentCollection {#4632 …}
+notifications: Doctrine\ORM\PersistentCollection {#4634 …}
-id: 271793
-bodyTs: "'edit':11 'enter':3 'grep':6,16 'grep-lik':5 'hit':10 'less':1 'like':7 'mode':8,17 'search':19"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6989308"
+editedAt: DateTimeImmutable @1710668038 {#4620
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4621
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "That’s not at all grep-like. Grep is a line filter, not a character sequence highlighter."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704168242 {#4674
date: 2024-01-02 05:04:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4679 …}
+nested: Doctrine\ORM\PersistentCollection {#4681 …}
+votes: Doctrine\ORM\PersistentCollection {#4683 …}
+reports: Doctrine\ORM\PersistentCollection {#4685 …}
+favourites: Doctrine\ORM\PersistentCollection {#4687 …}
+notifications: Doctrine\ORM\PersistentCollection {#4689 …}
-id: 272216
-bodyTs: "'charact':16 'filter':13 'grep':7,9 'grep-lik':6 'highlight':18 'like':8 'line':12 'sequenc':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7003983"
+editedAt: DateTimeImmutable @1710660465 {#4675
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4676
date: 2024-01-02 05:04:02.0 +01:00
}
}
+root: App\Entity\EntryComment {#4385}
+body: "Oops sorry it’s `&`! `/` is find"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704169378 {#4728
date: 2024-01-02 05:22:58.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@bjoern_tantau@swg-empire.de"
"@savedbythezsh@sh.itjust.works"
"@Atemu@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4731 …}
+nested: Doctrine\ORM\PersistentCollection {#4733 …}
+votes: Doctrine\ORM\PersistentCollection {#4735 …}
+reports: Doctrine\ORM\PersistentCollection {#4737 …}
+favourites: Doctrine\ORM\PersistentCollection {#4739 …}
+notifications: Doctrine\ORM\PersistentCollection {#4741 …}
-id: 272248
-bodyTs: "'find':6 'oop':1 'sorri':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/6996644"
+editedAt: null
+createdAt: DateTimeImmutable @1704169378 {#4729
date: 2024-01-02 05:22:58.0 +01:00
}
} |
|
Show voter details
|
| 65 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 66 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Run rsync, pipe to tee, and redirect the output to a named pipe (mkfifo). Open a second terminal and direct the named pipe into a grep command. Arrange the terminals in whatever way you want.\n
\n
```\n
\n
<span style="color:#323232;">mkfifo mypipe\n
</span><span style="color:#323232;">rsync | tee mypipe\n
</span><span style="color:#323232;">grep "denied" < mypipe\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 41
+score: 0
+lastActive: DateTime @1710646004 {#4454
date: 2024-03-17 04:26:44.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 271446
-bodyTs: "'arrang':28 'command':27 'deni':42 'direct':20 'grep':26,41 'mkfifo':14,36 'mypip':37,40,43 'name':12,22 'open':15 'output':9 'pipe':3,13,23 'redirect':7 'rsync':2,38 'run':1 'second':17 'tee':5,39 'termin':18,30 'want':35 'way':33 'whatev':32"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.nl/comment/5669884"
+editedAt: DateTimeImmutable @1710548585 {#4455
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4456
date: 2024-01-01 19:27:11.0 +01:00
}
} |
|
Show voter details
|
| 67 |
DENIED
|
edit
|
App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Run rsync, pipe to tee, and redirect the output to a named pipe (mkfifo). Open a second terminal and direct the named pipe into a grep command. Arrange the terminals in whatever way you want.\n
\n
```\n
\n
<span style="color:#323232;">mkfifo mypipe\n
</span><span style="color:#323232;">rsync | tee mypipe\n
</span><span style="color:#323232;">grep "denied" < mypipe\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 41
+score: 0
+lastActive: DateTime @1710646004 {#4454
date: 2024-03-17 04:26:44.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 271446
-bodyTs: "'arrang':28 'command':27 'deni':42 'direct':20 'grep':26,41 'mkfifo':14,36 'mypip':37,40,43 'name':12,22 'open':15 'output':9 'pipe':3,13,23 'redirect':7 'rsync':2,38 'run':1 'second':17 'tee':5,39 'termin':18,30 'want':35 'way':33 'whatev':32"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.nl/comment/5669884"
+editedAt: DateTimeImmutable @1710548585 {#4455
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4456
date: 2024-01-01 19:27:11.0 +01:00
}
} |
|
Show voter details
|
| 68 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Run rsync, pipe to tee, and redirect the output to a named pipe (mkfifo). Open a second terminal and direct the named pipe into a grep command. Arrange the terminals in whatever way you want.\n
\n
```\n
\n
<span style="color:#323232;">mkfifo mypipe\n
</span><span style="color:#323232;">rsync | tee mypipe\n
</span><span style="color:#323232;">grep "denied" < mypipe\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 41
+score: 0
+lastActive: DateTime @1710646004 {#4454
date: 2024-03-17 04:26:44.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 271446
-bodyTs: "'arrang':28 'command':27 'deni':42 'direct':20 'grep':26,41 'mkfifo':14,36 'mypip':37,40,43 'name':12,22 'open':15 'output':9 'pipe':3,13,23 'redirect':7 'rsync':2,38 'run':1 'second':17 'tee':5,39 'termin':18,30 'want':35 'way':33 'whatev':32"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.nl/comment/5669884"
+editedAt: DateTimeImmutable @1710548585 {#4455
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4456
date: 2024-01-01 19:27:11.0 +01:00
}
} |
|
Show voter details
|
| 69 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 70 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4606
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Run rsync, pipe to tee, and redirect the output to a named pipe (mkfifo). Open a second terminal and direct the named pipe into a grep command. Arrange the terminals in whatever way you want.\n
\n
```\n
\n
<span style="color:#323232;">mkfifo mypipe\n
</span><span style="color:#323232;">rsync | tee mypipe\n
</span><span style="color:#323232;">grep "denied" < mypipe\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 41
+score: 0
+lastActive: DateTime @1710646004 {#4454
date: 2024-03-17 04:26:44.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 271446
-bodyTs: "'arrang':28 'command':27 'deni':42 'direct':20 'grep':26,41 'mkfifo':14,36 'mypip':37,40,43 'name':12,22 'open':15 'output':9 'pipe':3,13,23 'redirect':7 'rsync':2,38 'run':1 'second':17 'tee':5,39 'termin':18,30 'want':35 'way':33 'whatev':32"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.nl/comment/5669884"
+editedAt: DateTimeImmutable @1710548585 {#4455
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4456
date: 2024-01-01 19:27:11.0 +01:00
}
}
+root: App\Entity\EntryComment {#4460}
+body: "Elegant and flexible, thank you!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704163513 {#4604
date: 2024-01-02 03:45:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@lemmyvore@feddit.nl"
]
+children: Doctrine\ORM\PersistentCollection {#4607 …}
+nested: Doctrine\ORM\PersistentCollection {#4609 …}
+votes: Doctrine\ORM\PersistentCollection {#4611 …}
+reports: Doctrine\ORM\PersistentCollection {#4613 …}
+favourites: Doctrine\ORM\PersistentCollection {#4615 …}
+notifications: Doctrine\ORM\PersistentCollection {#4617 …}
-id: 272129
-bodyTs: "'eleg':1 'flexibl':3 'thank':4"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995222"
+editedAt: null
+createdAt: DateTimeImmutable @1704163513 {#4605
date: 2024-01-02 03:45:13.0 +01:00
}
} |
|
Show voter details
|
| 71 |
DENIED
|
edit
|
App\Entity\EntryComment {#4606
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Run rsync, pipe to tee, and redirect the output to a named pipe (mkfifo). Open a second terminal and direct the named pipe into a grep command. Arrange the terminals in whatever way you want.\n
\n
```\n
\n
<span style="color:#323232;">mkfifo mypipe\n
</span><span style="color:#323232;">rsync | tee mypipe\n
</span><span style="color:#323232;">grep "denied" < mypipe\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 41
+score: 0
+lastActive: DateTime @1710646004 {#4454
date: 2024-03-17 04:26:44.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 271446
-bodyTs: "'arrang':28 'command':27 'deni':42 'direct':20 'grep':26,41 'mkfifo':14,36 'mypip':37,40,43 'name':12,22 'open':15 'output':9 'pipe':3,13,23 'redirect':7 'rsync':2,38 'run':1 'second':17 'tee':5,39 'termin':18,30 'want':35 'way':33 'whatev':32"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.nl/comment/5669884"
+editedAt: DateTimeImmutable @1710548585 {#4455
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4456
date: 2024-01-01 19:27:11.0 +01:00
}
}
+root: App\Entity\EntryComment {#4460}
+body: "Elegant and flexible, thank you!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704163513 {#4604
date: 2024-01-02 03:45:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@lemmyvore@feddit.nl"
]
+children: Doctrine\ORM\PersistentCollection {#4607 …}
+nested: Doctrine\ORM\PersistentCollection {#4609 …}
+votes: Doctrine\ORM\PersistentCollection {#4611 …}
+reports: Doctrine\ORM\PersistentCollection {#4613 …}
+favourites: Doctrine\ORM\PersistentCollection {#4615 …}
+notifications: Doctrine\ORM\PersistentCollection {#4617 …}
-id: 272129
-bodyTs: "'eleg':1 'flexibl':3 'thank':4"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995222"
+editedAt: null
+createdAt: DateTimeImmutable @1704163513 {#4605
date: 2024-01-02 03:45:13.0 +01:00
}
} |
|
Show voter details
|
| 72 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4606
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Run rsync, pipe to tee, and redirect the output to a named pipe (mkfifo). Open a second terminal and direct the named pipe into a grep command. Arrange the terminals in whatever way you want.\n
\n
```\n
\n
<span style="color:#323232;">mkfifo mypipe\n
</span><span style="color:#323232;">rsync | tee mypipe\n
</span><span style="color:#323232;">grep "denied" < mypipe\n
</span>\n
```
"""
+lang: "en"
+isAdult: false
+favouriteCount: 41
+score: 0
+lastActive: DateTime @1710646004 {#4454
date: 2024-03-17 04:26:44.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 271446
-bodyTs: "'arrang':28 'command':27 'deni':42 'direct':20 'grep':26,41 'mkfifo':14,36 'mypip':37,40,43 'name':12,22 'open':15 'output':9 'pipe':3,13,23 'redirect':7 'rsync':2,38 'run':1 'second':17 'tee':5,39 'termin':18,30 'want':35 'way':33 'whatev':32"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.nl/comment/5669884"
+editedAt: DateTimeImmutable @1710548585 {#4455
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4456
date: 2024-01-01 19:27:11.0 +01:00
}
}
+root: App\Entity\EntryComment {#4460}
+body: "Elegant and flexible, thank you!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704163513 {#4604
date: 2024-01-02 03:45:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
"@lemmyvore@feddit.nl"
]
+children: Doctrine\ORM\PersistentCollection {#4607 …}
+nested: Doctrine\ORM\PersistentCollection {#4609 …}
+votes: Doctrine\ORM\PersistentCollection {#4611 …}
+reports: Doctrine\ORM\PersistentCollection {#4613 …}
+favourites: Doctrine\ORM\PersistentCollection {#4615 …}
+notifications: Doctrine\ORM\PersistentCollection {#4617 …}
-id: 272129
-bodyTs: "'eleg':1 'flexibl':3 'thank':4"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5995222"
+editedAt: null
+createdAt: DateTimeImmutable @1704163513 {#4605
date: 2024-01-02 03:45:13.0 +01:00
}
} |
|
Show voter details
|
| 73 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 74 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
} |
|
Show voter details
|
| 75 |
DENIED
|
edit
|
App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
} |
|
Show voter details
|
| 76 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
} |
|
Show voter details
|
| 77 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 78 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4562
+user: Proxies\__CG__\App\Entity\User {#4556 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "I know this isn’t an answer you’re looking for, but I’ll at least say that I find tmux to be infinitely useful and highly recommend checking it out"
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1704135409 {#4563
date: 2024-01-01 19:56:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4550 …}
+nested: Doctrine\ORM\PersistentCollection {#4554 …}
+votes: Doctrine\ORM\PersistentCollection {#4552 …}
+reports: Doctrine\ORM\PersistentCollection {#4566 …}
+favourites: Doctrine\ORM\PersistentCollection {#4568 …}
+notifications: Doctrine\ORM\PersistentCollection {#4570 …}
-id: 271713
-bodyTs: "'answer':7 'check':29 'find':20 'high':27 'infinit':24 'isn':4 'know':2 'least':16 'll':14 'look':10 're':9 'recommend':28 'say':17 'tmux':21 'use':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.mkwarman.com/comment/134758"
+editedAt: null
+createdAt: DateTimeImmutable @1704135409 {#4560
date: 2024-01-01 19:56:49.0 +01:00
}
} |
|
Show voter details
|
| 79 |
DENIED
|
edit
|
App\Entity\EntryComment {#4562
+user: Proxies\__CG__\App\Entity\User {#4556 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "I know this isn’t an answer you’re looking for, but I’ll at least say that I find tmux to be infinitely useful and highly recommend checking it out"
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1704135409 {#4563
date: 2024-01-01 19:56:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4550 …}
+nested: Doctrine\ORM\PersistentCollection {#4554 …}
+votes: Doctrine\ORM\PersistentCollection {#4552 …}
+reports: Doctrine\ORM\PersistentCollection {#4566 …}
+favourites: Doctrine\ORM\PersistentCollection {#4568 …}
+notifications: Doctrine\ORM\PersistentCollection {#4570 …}
-id: 271713
-bodyTs: "'answer':7 'check':29 'find':20 'high':27 'infinit':24 'isn':4 'know':2 'least':16 'll':14 'look':10 're':9 'recommend':28 'say':17 'tmux':21 'use':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.mkwarman.com/comment/134758"
+editedAt: null
+createdAt: DateTimeImmutable @1704135409 {#4560
date: 2024-01-01 19:56:49.0 +01:00
}
} |
|
Show voter details
|
| 80 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4562
+user: Proxies\__CG__\App\Entity\User {#4556 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "I know this isn’t an answer you’re looking for, but I’ll at least say that I find tmux to be infinitely useful and highly recommend checking it out"
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1704135409 {#4563
date: 2024-01-01 19:56:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4550 …}
+nested: Doctrine\ORM\PersistentCollection {#4554 …}
+votes: Doctrine\ORM\PersistentCollection {#4552 …}
+reports: Doctrine\ORM\PersistentCollection {#4566 …}
+favourites: Doctrine\ORM\PersistentCollection {#4568 …}
+notifications: Doctrine\ORM\PersistentCollection {#4570 …}
-id: 271713
-bodyTs: "'answer':7 'check':29 'find':20 'high':27 'infinit':24 'isn':4 'know':2 'least':16 'll':14 'look':10 're':9 'recommend':28 'say':17 'tmux':21 'use':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.mkwarman.com/comment/134758"
+editedAt: null
+createdAt: DateTimeImmutable @1704135409 {#4560
date: 2024-01-01 19:56:49.0 +01:00
}
} |
|
Show voter details
|
| 81 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 82 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4574
+user: Proxies\__CG__\App\Entity\User {#4575 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "Tmux is also good for long operations, as tmux is running as a server and you can close the terminal while tmux chugs away. Others can also connect to the tmux session through ssh and share screens."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1704143703 {#4572
date: 2024-01-01 22:15:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4576 …}
+nested: Doctrine\ORM\PersistentCollection {#4578 …}
+votes: Doctrine\ORM\PersistentCollection {#4580 …}
+reports: Doctrine\ORM\PersistentCollection {#4582 …}
+favourites: Doctrine\ORM\PersistentCollection {#4584 …}
+notifications: Doctrine\ORM\PersistentCollection {#4586 …}
-id: 271838
-bodyTs: "'also':3,27 'away':24 'chug':23 'close':18 'connect':28 'good':4 'long':6 'oper':7 'other':25 'run':11 'screen':37 'server':14 'session':32 'share':36 'ssh':34 'termin':20 'tmux':1,9,22,31"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/6338887"
+editedAt: null
+createdAt: DateTimeImmutable @1704143703 {#4573
date: 2024-01-01 22:15:03.0 +01:00
}
} |
|
Show voter details
|
| 83 |
DENIED
|
edit
|
App\Entity\EntryComment {#4574
+user: Proxies\__CG__\App\Entity\User {#4575 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "Tmux is also good for long operations, as tmux is running as a server and you can close the terminal while tmux chugs away. Others can also connect to the tmux session through ssh and share screens."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1704143703 {#4572
date: 2024-01-01 22:15:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4576 …}
+nested: Doctrine\ORM\PersistentCollection {#4578 …}
+votes: Doctrine\ORM\PersistentCollection {#4580 …}
+reports: Doctrine\ORM\PersistentCollection {#4582 …}
+favourites: Doctrine\ORM\PersistentCollection {#4584 …}
+notifications: Doctrine\ORM\PersistentCollection {#4586 …}
-id: 271838
-bodyTs: "'also':3,27 'away':24 'chug':23 'close':18 'connect':28 'good':4 'long':6 'oper':7 'other':25 'run':11 'screen':37 'server':14 'session':32 'share':36 'ssh':34 'termin':20 'tmux':1,9,22,31"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/6338887"
+editedAt: null
+createdAt: DateTimeImmutable @1704143703 {#4573
date: 2024-01-01 22:15:03.0 +01:00
}
} |
|
Show voter details
|
| 84 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4574
+user: Proxies\__CG__\App\Entity\User {#4575 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "Tmux is also good for long operations, as tmux is running as a server and you can close the terminal while tmux chugs away. Others can also connect to the tmux session through ssh and share screens."
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1704143703 {#4572
date: 2024-01-01 22:15:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4576 …}
+nested: Doctrine\ORM\PersistentCollection {#4578 …}
+votes: Doctrine\ORM\PersistentCollection {#4580 …}
+reports: Doctrine\ORM\PersistentCollection {#4582 …}
+favourites: Doctrine\ORM\PersistentCollection {#4584 …}
+notifications: Doctrine\ORM\PersistentCollection {#4586 …}
-id: 271838
-bodyTs: "'also':3,27 'away':24 'chug':23 'close':18 'connect':28 'good':4 'long':6 'oper':7 'other':25 'run':11 'screen':37 'server':14 'session':32 'share':36 'ssh':34 'termin':20 'tmux':1,9,22,31"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/6338887"
+editedAt: null
+createdAt: DateTimeImmutable @1704143703 {#4573
date: 2024-01-01 22:15:03.0 +01:00
}
} |
|
Show voter details
|
| 85 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
| 86 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4590
+user: Proxies\__CG__\App\Entity\User {#4591 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "Don’t feed the beast."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704171690 {#4588
date: 2024-01-02 06:01:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4592 …}
+nested: Doctrine\ORM\PersistentCollection {#4594 …}
+votes: Doctrine\ORM\PersistentCollection {#4596 …}
+reports: Doctrine\ORM\PersistentCollection {#4598 …}
+favourites: Doctrine\ORM\PersistentCollection {#4600 …}
+notifications: Doctrine\ORM\PersistentCollection {#4602 …}
-id: 272310
-bodyTs: "'beast':5 'feed':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7004598"
+editedAt: null
+createdAt: DateTimeImmutable @1704171690 {#4589
date: 2024-01-02 06:01:30.0 +01:00
}
} |
|
Show voter details
|
| 87 |
DENIED
|
edit
|
App\Entity\EntryComment {#4590
+user: Proxies\__CG__\App\Entity\User {#4591 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "Don’t feed the beast."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704171690 {#4588
date: 2024-01-02 06:01:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4592 …}
+nested: Doctrine\ORM\PersistentCollection {#4594 …}
+votes: Doctrine\ORM\PersistentCollection {#4596 …}
+reports: Doctrine\ORM\PersistentCollection {#4598 …}
+favourites: Doctrine\ORM\PersistentCollection {#4600 …}
+notifications: Doctrine\ORM\PersistentCollection {#4602 …}
-id: 272310
-bodyTs: "'beast':5 'feed':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7004598"
+editedAt: null
+createdAt: DateTimeImmutable @1704171690 {#4589
date: 2024-01-02 06:01:30.0 +01:00
}
} |
|
Show voter details
|
| 88 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4590
+user: Proxies\__CG__\App\Entity\User {#4591 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+slug: "Is-there-such-a-thing-as-split-screen-grep"
+title: "Is there such a thing as split-screen grep?"
+url: null
+body: """
I want to run a command and see all of its output on the left hand side, while simultaneously searching/grepping for particular lines on the right hand side. In other words, I want a temporary vertically split screen in my CLI, ideally with scrollback on each side of the split, but where I expect the left hand side to be scrolling thousands of lines quickly, while on the right hand side is a slow accumulation of “matches” to my grep.\n
\n
Is this possible today? What tools would you recommend to accomplish this?\n
\n
EDIT: To be clear, a one-liner is preferable over learning tmux or screen, although this does motivate me to perhaps begin learning tmux.\n
\n
In case this is an X/Y problem: The specific command I’m trying to run is an rsync simulation (dry-run) where I want to both check that the command works, and subsequently check that there are no `denied` errors. The recommended way to do this is to run the command twice, as follows (but I want to combine it into one pass):\n
\n
```\n
\n
<span style="color:#323232;"># first specify the "-n" parameter so rsync will simulate its operation. You should use this before you start:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/\n
</span><span style="color:#323232;">\n
</span><span style="color:#323232;"># check for permission denied errors in your homedir:\n
</span><span style="color:#323232;">rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | grep denied\n
</span>\n
```
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 21
+favouriteCount: 57
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1719267028 {#2414
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+children: []
-id: 26591
-titleTs: "'grep':10 'screen':9 'split':8 'split-screen':7 'thing':5"
-bodyTs: "'/home':206,223 'accomplish':91 'accumul':75 'although':108 'backupdir':208,225 'begin':115 'case':119 'check':145,152,209 'clear':96 'cli':41 'combin':177 'command':6,127,148,169 'deni':157,212,227 'dri':138 'dry-run':137 'edit':93 'error':158,213 'exclud':203,220 'exclude-from':202,219 'expect':54 'first':182 'follow':172 'grep':80,226 'hand':16,27,57,70 'homedir':216 'ideal':42 'learn':104,116 'left':15,56 'line':23,64 'liner':100 'm':129 'match':77 'motiv':111 'n':185 'nap':201,218 'one':99,180 'one-lin':98 'oper':192 'output':12 'paramet':186 'particular':22 'pass':181 'perhap':114 'permiss':211 'possibl':83 'prefer':102 'problem':124 'quick':65 'recommend':89,160 'right':26,69 'rsync':135,188,200,217 'rsync-homedir-local.txt':205,222 'run':4,132,139,167 'screen':38,107 'scroll':61 'scrollback':44 'searching/grepping':20 'see':8 'side':17,28,47,58,71 'simul':136,190 'simultan':19 'slow':74 'specif':126 'specifi':183 'split':37,50 'start':199 'subsequ':151 'temporari':35 'thousand':62 'tmux':105,117 'today':84 'tool':86 'tri':130 'twice':170 'use':195 'user':207,224 'vertic':36 'want':2,33,142,175 'way':161 'word':31 'work':149 'would':87 'x/y':123"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1704218040
+visibility: "visible "
+apId: "https://lemmy.ca/post/12450133"
+editedAt: DateTimeImmutable @1710501214 {#1793
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2402
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4533
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
ChatGPT suggests the following:\n
\n
1. Run tmux\n
2. `rsync -naP --exclude-from=rsync-homedir-local.txt /home/$USER/ $BACKUPDIR/ | tee /tmp/rsync_output.txt`\n
3. Ctrl+B % # splits screen vertically\n
4. Ctrl+B right-arrow-key # moves to right split\n
5. `tail -f /tmp/rsync_output.txt | grep denied`\n
\n
Not quite a one-liner, but I can see how tmux is a big help here.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1710681170 {#4528
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4534 …}
+nested: Doctrine\ORM\PersistentCollection {#4536 …}
+votes: Doctrine\ORM\PersistentCollection {#4538 …}
+reports: Doctrine\ORM\PersistentCollection {#4540 …}
+favourites: Doctrine\ORM\PersistentCollection {#4542 …}
+notifications: Doctrine\ORM\PersistentCollection {#4544 …}
-id: 271326
-bodyTs: "'/home':15 '/tmp/rsync_output.txt':19,40 '1':5 '2':8 '3':20 '4':26 '5':37 'arrow':31 'b':22,28 'backupdir':17 'big':57 'chatgpt':1 'ctrl':21,27 'deni':42 'exclud':12 'exclude-from':11 'f':39 'follow':4 'grep':41 'help':58 'key':32 'liner':48 'move':33 'nap':10 'one':47 'one-lin':46 'quit':44 'right':30,35 'right-arrow-key':29 'rsync':9 'rsync-homedir-local.txt':14 'run':6 'screen':24 'see':52 'split':23,36 'suggest':2 'tail':38 'tee':18 'tmux':7,54 'user':16 'vertic':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ca/comment/5987685"
+editedAt: null
+createdAt: DateTimeImmutable @1704132528 {#4529
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4533}
+body: "Don’t feed the beast."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704171690 {#4588
date: 2024-01-02 06:01:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4592 …}
+nested: Doctrine\ORM\PersistentCollection {#4594 …}
+votes: Doctrine\ORM\PersistentCollection {#4596 …}
+reports: Doctrine\ORM\PersistentCollection {#4598 …}
+favourites: Doctrine\ORM\PersistentCollection {#4600 …}
+notifications: Doctrine\ORM\PersistentCollection {#4602 …}
-id: 272310
-bodyTs: "'beast':5 'feed':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/7004598"
+editedAt: null
+createdAt: DateTimeImmutable @1704171690 {#4589
date: 2024-01-02 06:01:30.0 +01:00
}
} |
|
Show voter details
|
| 89 |
DENIED
|
edit
|
App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
} |
|
Show voter details
|