1 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
2 |
DENIED
|
moderate
|
App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
} |
|
Show voter details
|
3 |
DENIED
|
edit
|
App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
} |
|
Show voter details
|
4 |
DENIED
|
moderate
|
App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
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 {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
} |
|
Show voter details
|
7 |
DENIED
|
edit
|
App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
} |
|
Show voter details
|
8 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
} |
|
Show voter details
|
9 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
10 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
} |
|
Show voter details
|
11 |
DENIED
|
edit
|
App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
} |
|
Show voter details
|
12 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
} |
|
Show voter details
|
13 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
14 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4695
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4693
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 {#4696 …}
+nested: Doctrine\ORM\PersistentCollection {#4698 …}
+votes: Doctrine\ORM\PersistentCollection {#4700 …}
+reports: Doctrine\ORM\PersistentCollection {#4702 …}
+favourites: Doctrine\ORM\PersistentCollection {#4704 …}
+notifications: Doctrine\ORM\PersistentCollection {#4706 …}
-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 {#4694
date: 2024-01-09 01:36:40.0 +01:00
}
} |
|
Show voter details
|
15 |
DENIED
|
edit
|
App\Entity\EntryComment {#4695
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4693
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 {#4696 …}
+nested: Doctrine\ORM\PersistentCollection {#4698 …}
+votes: Doctrine\ORM\PersistentCollection {#4700 …}
+reports: Doctrine\ORM\PersistentCollection {#4702 …}
+favourites: Doctrine\ORM\PersistentCollection {#4704 …}
+notifications: Doctrine\ORM\PersistentCollection {#4706 …}
-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 {#4694
date: 2024-01-09 01:36:40.0 +01:00
}
} |
|
Show voter details
|
16 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4695
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4693
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 {#4696 …}
+nested: Doctrine\ORM\PersistentCollection {#4698 …}
+votes: Doctrine\ORM\PersistentCollection {#4700 …}
+reports: Doctrine\ORM\PersistentCollection {#4702 …}
+favourites: Doctrine\ORM\PersistentCollection {#4704 …}
+notifications: Doctrine\ORM\PersistentCollection {#4706 …}
-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 {#4694
date: 2024-01-09 01:36:40.0 +01:00
}
} |
|
Show voter details
|
17 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
18 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4747
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4695
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4693
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 {#4696 …}
+nested: Doctrine\ORM\PersistentCollection {#4698 …}
+votes: Doctrine\ORM\PersistentCollection {#4700 …}
+reports: Doctrine\ORM\PersistentCollection {#4702 …}
+favourites: Doctrine\ORM\PersistentCollection {#4704 …}
+notifications: Doctrine\ORM\PersistentCollection {#4706 …}
-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 {#4694
date: 2024-01-09 01:36:40.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+body: "Thanks!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704779147 {#4745
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 {#4748 …}
+nested: Doctrine\ORM\PersistentCollection {#4750 …}
+votes: Doctrine\ORM\PersistentCollection {#4752 …}
+reports: Doctrine\ORM\PersistentCollection {#4754 …}
+favourites: Doctrine\ORM\PersistentCollection {#4756 …}
+notifications: Doctrine\ORM\PersistentCollection {#4758 …}
-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 {#4746
date: 2024-01-09 06:45:47.0 +01:00
}
} |
|
Show voter details
|
19 |
DENIED
|
edit
|
App\Entity\EntryComment {#4747
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4695
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4693
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 {#4696 …}
+nested: Doctrine\ORM\PersistentCollection {#4698 …}
+votes: Doctrine\ORM\PersistentCollection {#4700 …}
+reports: Doctrine\ORM\PersistentCollection {#4702 …}
+favourites: Doctrine\ORM\PersistentCollection {#4704 …}
+notifications: Doctrine\ORM\PersistentCollection {#4706 …}
-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 {#4694
date: 2024-01-09 01:36:40.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+body: "Thanks!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704779147 {#4745
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 {#4748 …}
+nested: Doctrine\ORM\PersistentCollection {#4750 …}
+votes: Doctrine\ORM\PersistentCollection {#4752 …}
+reports: Doctrine\ORM\PersistentCollection {#4754 …}
+favourites: Doctrine\ORM\PersistentCollection {#4756 …}
+notifications: Doctrine\ORM\PersistentCollection {#4758 …}
-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 {#4746
date: 2024-01-09 06:45:47.0 +01:00
}
} |
|
Show voter details
|
20 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4747
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4695
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4640
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4033
+user: App\Entity\User {#3981 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4042
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4031 …}
+nested: Doctrine\ORM\PersistentCollection {#4029 …}
+votes: Doctrine\ORM\PersistentCollection {#4027 …}
+reports: Doctrine\ORM\PersistentCollection {#4025 …}
+favourites: Doctrine\ORM\PersistentCollection {#3993 …}
+notifications: Doctrine\ORM\PersistentCollection {#3997 …}
-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 {#3978
date: 2024-01-02 00:01:52.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4638
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 {#4641 …}
+nested: Doctrine\ORM\PersistentCollection {#4643 …}
+votes: Doctrine\ORM\PersistentCollection {#4645 …}
+reports: Doctrine\ORM\PersistentCollection {#4647 …}
+favourites: Doctrine\ORM\PersistentCollection {#4649 …}
+notifications: Doctrine\ORM\PersistentCollection {#4651 …}
-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 {#4639
date: 2024-01-02 03:51:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+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 {#4693
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 {#4696 …}
+nested: Doctrine\ORM\PersistentCollection {#4698 …}
+votes: Doctrine\ORM\PersistentCollection {#4700 …}
+reports: Doctrine\ORM\PersistentCollection {#4702 …}
+favourites: Doctrine\ORM\PersistentCollection {#4704 …}
+notifications: Doctrine\ORM\PersistentCollection {#4706 …}
-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 {#4694
date: 2024-01-09 01:36:40.0 +01:00
}
}
+root: App\Entity\EntryComment {#4033}
+body: "Thanks!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704779147 {#4745
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 {#4748 …}
+nested: Doctrine\ORM\PersistentCollection {#4750 …}
+votes: Doctrine\ORM\PersistentCollection {#4752 …}
+reports: Doctrine\ORM\PersistentCollection {#4754 …}
+favourites: Doctrine\ORM\PersistentCollection {#4756 …}
+notifications: Doctrine\ORM\PersistentCollection {#4758 …}
-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 {#4746
date: 2024-01-09 06:45:47.0 +01:00
}
} |
|
Show voter details
|
21 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
22 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
} |
|
Show voter details
|
23 |
DENIED
|
edit
|
App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
} |
|
Show voter details
|
24 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
} |
|
Show voter details
|
25 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
26 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4564
+user: Proxies\__CG__\App\Entity\User {#4558 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+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 {#4565
date: 2024-01-01 19:56:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4552 …}
+nested: Doctrine\ORM\PersistentCollection {#4556 …}
+votes: Doctrine\ORM\PersistentCollection {#4554 …}
+reports: Doctrine\ORM\PersistentCollection {#4568 …}
+favourites: Doctrine\ORM\PersistentCollection {#4570 …}
+notifications: Doctrine\ORM\PersistentCollection {#4572 …}
-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 {#4562
date: 2024-01-01 19:56:49.0 +01:00
}
} |
|
Show voter details
|
27 |
DENIED
|
edit
|
App\Entity\EntryComment {#4564
+user: Proxies\__CG__\App\Entity\User {#4558 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+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 {#4565
date: 2024-01-01 19:56:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4552 …}
+nested: Doctrine\ORM\PersistentCollection {#4556 …}
+votes: Doctrine\ORM\PersistentCollection {#4554 …}
+reports: Doctrine\ORM\PersistentCollection {#4568 …}
+favourites: Doctrine\ORM\PersistentCollection {#4570 …}
+notifications: Doctrine\ORM\PersistentCollection {#4572 …}
-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 {#4562
date: 2024-01-01 19:56:49.0 +01:00
}
} |
|
Show voter details
|
28 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4564
+user: Proxies\__CG__\App\Entity\User {#4558 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+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 {#4565
date: 2024-01-01 19:56:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4552 …}
+nested: Doctrine\ORM\PersistentCollection {#4556 …}
+votes: Doctrine\ORM\PersistentCollection {#4554 …}
+reports: Doctrine\ORM\PersistentCollection {#4568 …}
+favourites: Doctrine\ORM\PersistentCollection {#4570 …}
+notifications: Doctrine\ORM\PersistentCollection {#4572 …}
-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 {#4562
date: 2024-01-01 19:56:49.0 +01:00
}
} |
|
Show voter details
|
29 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
30 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4576
+user: Proxies\__CG__\App\Entity\User {#4577 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+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 {#4574
date: 2024-01-01 22:15:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4578 …}
+nested: Doctrine\ORM\PersistentCollection {#4580 …}
+votes: Doctrine\ORM\PersistentCollection {#4582 …}
+reports: Doctrine\ORM\PersistentCollection {#4584 …}
+favourites: Doctrine\ORM\PersistentCollection {#4586 …}
+notifications: Doctrine\ORM\PersistentCollection {#4588 …}
-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 {#4575
date: 2024-01-01 22:15:03.0 +01:00
}
} |
|
Show voter details
|
31 |
DENIED
|
edit
|
App\Entity\EntryComment {#4576
+user: Proxies\__CG__\App\Entity\User {#4577 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+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 {#4574
date: 2024-01-01 22:15:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4578 …}
+nested: Doctrine\ORM\PersistentCollection {#4580 …}
+votes: Doctrine\ORM\PersistentCollection {#4582 …}
+reports: Doctrine\ORM\PersistentCollection {#4584 …}
+favourites: Doctrine\ORM\PersistentCollection {#4586 …}
+notifications: Doctrine\ORM\PersistentCollection {#4588 …}
-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 {#4575
date: 2024-01-01 22:15:03.0 +01:00
}
} |
|
Show voter details
|
32 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4576
+user: Proxies\__CG__\App\Entity\User {#4577 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+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 {#4574
date: 2024-01-01 22:15:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4578 …}
+nested: Doctrine\ORM\PersistentCollection {#4580 …}
+votes: Doctrine\ORM\PersistentCollection {#4582 …}
+reports: Doctrine\ORM\PersistentCollection {#4584 …}
+favourites: Doctrine\ORM\PersistentCollection {#4586 …}
+notifications: Doctrine\ORM\PersistentCollection {#4588 …}
-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 {#4575
date: 2024-01-01 22:15:03.0 +01:00
}
} |
|
Show voter details
|
33 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
34 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4592
+user: Proxies\__CG__\App\Entity\User {#4593 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+body: "Don’t feed the beast."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704171690 {#4590
date: 2024-01-02 06:01:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4594 …}
+nested: Doctrine\ORM\PersistentCollection {#4596 …}
+votes: Doctrine\ORM\PersistentCollection {#4598 …}
+reports: Doctrine\ORM\PersistentCollection {#4600 …}
+favourites: Doctrine\ORM\PersistentCollection {#4602 …}
+notifications: Doctrine\ORM\PersistentCollection {#4604 …}
-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 {#4591
date: 2024-01-02 06:01:30.0 +01:00
}
} |
|
Show voter details
|
35 |
DENIED
|
edit
|
App\Entity\EntryComment {#4592
+user: Proxies\__CG__\App\Entity\User {#4593 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+body: "Don’t feed the beast."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704171690 {#4590
date: 2024-01-02 06:01:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4594 …}
+nested: Doctrine\ORM\PersistentCollection {#4596 …}
+votes: Doctrine\ORM\PersistentCollection {#4598 …}
+reports: Doctrine\ORM\PersistentCollection {#4600 …}
+favourites: Doctrine\ORM\PersistentCollection {#4602 …}
+notifications: Doctrine\ORM\PersistentCollection {#4604 …}
-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 {#4591
date: 2024-01-02 06:01:30.0 +01:00
}
} |
|
Show voter details
|
36 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4592
+user: Proxies\__CG__\App\Entity\User {#4593 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4065
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4071
date: 2024-03-17 14:12:50.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4070 …}
+nested: Doctrine\ORM\PersistentCollection {#4069 …}
+votes: Doctrine\ORM\PersistentCollection {#4060 …}
+reports: Doctrine\ORM\PersistentCollection {#4063 …}
+favourites: Doctrine\ORM\PersistentCollection {#4058 …}
+notifications: Doctrine\ORM\PersistentCollection {#4056 …}
-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 {#4076
date: 2024-01-01 19:08:48.0 +01:00
}
}
+root: App\Entity\EntryComment {#4065}
+body: "Don’t feed the beast."
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1704171690 {#4590
date: 2024-01-02 06:01:30.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4594 …}
+nested: Doctrine\ORM\PersistentCollection {#4596 …}
+votes: Doctrine\ORM\PersistentCollection {#4598 …}
+reports: Doctrine\ORM\PersistentCollection {#4600 …}
+favourites: Doctrine\ORM\PersistentCollection {#4602 …}
+notifications: Doctrine\ORM\PersistentCollection {#4604 …}
-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 {#4591
date: 2024-01-02 06:01:30.0 +01:00
}
} |
|
Show voter details
|
37 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
38 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
} |
|
Show voter details
|
39 |
DENIED
|
edit
|
App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
} |
|
Show voter details
|
40 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
} |
|
Show voter details
|
41 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
42 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
} |
|
Show voter details
|
43 |
DENIED
|
edit
|
App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
} |
|
Show voter details
|
44 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
} |
|
Show voter details
|
45 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
46 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4658
+user: Proxies\__CG__\App\Entity\User {#4662 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4657
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 {#4667 …}
+nested: Doctrine\ORM\PersistentCollection {#4663 …}
+votes: Doctrine\ORM\PersistentCollection {#4665 …}
+reports: Doctrine\ORM\PersistentCollection {#4670 …}
+favourites: Doctrine\ORM\PersistentCollection {#4672 …}
+notifications: Doctrine\ORM\PersistentCollection {#4674 …}
-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 {#4654
date: 2024-01-02 00:06:55.0 +01:00
}
} |
|
Show voter details
|
47 |
DENIED
|
edit
|
App\Entity\EntryComment {#4658
+user: Proxies\__CG__\App\Entity\User {#4662 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4657
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 {#4667 …}
+nested: Doctrine\ORM\PersistentCollection {#4663 …}
+votes: Doctrine\ORM\PersistentCollection {#4665 …}
+reports: Doctrine\ORM\PersistentCollection {#4670 …}
+favourites: Doctrine\ORM\PersistentCollection {#4672 …}
+notifications: Doctrine\ORM\PersistentCollection {#4674 …}
-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 {#4654
date: 2024-01-02 00:06:55.0 +01:00
}
} |
|
Show voter details
|
48 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4658
+user: Proxies\__CG__\App\Entity\User {#4662 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4657
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 {#4667 …}
+nested: Doctrine\ORM\PersistentCollection {#4663 …}
+votes: Doctrine\ORM\PersistentCollection {#4665 …}
+reports: Doctrine\ORM\PersistentCollection {#4670 …}
+favourites: Doctrine\ORM\PersistentCollection {#4672 …}
+notifications: Doctrine\ORM\PersistentCollection {#4674 …}
-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 {#4654
date: 2024-01-02 00:06:55.0 +01:00
}
} |
|
Show voter details
|
49 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
50 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4718
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4658
+user: Proxies\__CG__\App\Entity\User {#4662 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4657
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 {#4667 …}
+nested: Doctrine\ORM\PersistentCollection {#4663 …}
+votes: Doctrine\ORM\PersistentCollection {#4665 …}
+reports: Doctrine\ORM\PersistentCollection {#4670 …}
+favourites: Doctrine\ORM\PersistentCollection {#4672 …}
+notifications: Doctrine\ORM\PersistentCollection {#4674 …}
-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 {#4654
date: 2024-01-02 00:06:55.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+body: "Oops yeah I just edited my comment, put the wrong symbol!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704169459 {#4719
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 {#4715 …}
+nested: Doctrine\ORM\PersistentCollection {#4711 …}
+votes: Doctrine\ORM\PersistentCollection {#4709 …}
+reports: Doctrine\ORM\PersistentCollection {#4724 …}
+favourites: Doctrine\ORM\PersistentCollection {#4726 …}
+notifications: Doctrine\ORM\PersistentCollection {#4728 …}
-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 {#4722
date: 2024-01-02 05:24:19.0 +01:00
}
} |
|
Show voter details
|
51 |
DENIED
|
edit
|
App\Entity\EntryComment {#4718
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4658
+user: Proxies\__CG__\App\Entity\User {#4662 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4657
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 {#4667 …}
+nested: Doctrine\ORM\PersistentCollection {#4663 …}
+votes: Doctrine\ORM\PersistentCollection {#4665 …}
+reports: Doctrine\ORM\PersistentCollection {#4670 …}
+favourites: Doctrine\ORM\PersistentCollection {#4672 …}
+notifications: Doctrine\ORM\PersistentCollection {#4674 …}
-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 {#4654
date: 2024-01-02 00:06:55.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+body: "Oops yeah I just edited my comment, put the wrong symbol!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704169459 {#4719
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 {#4715 …}
+nested: Doctrine\ORM\PersistentCollection {#4711 …}
+votes: Doctrine\ORM\PersistentCollection {#4709 …}
+reports: Doctrine\ORM\PersistentCollection {#4724 …}
+favourites: Doctrine\ORM\PersistentCollection {#4726 …}
+notifications: Doctrine\ORM\PersistentCollection {#4728 …}
-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 {#4722
date: 2024-01-02 05:24:19.0 +01:00
}
} |
|
Show voter details
|
52 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4718
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4658
+user: Proxies\__CG__\App\Entity\User {#4662 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4657
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 {#4667 …}
+nested: Doctrine\ORM\PersistentCollection {#4663 …}
+votes: Doctrine\ORM\PersistentCollection {#4665 …}
+reports: Doctrine\ORM\PersistentCollection {#4670 …}
+favourites: Doctrine\ORM\PersistentCollection {#4672 …}
+notifications: Doctrine\ORM\PersistentCollection {#4674 …}
-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 {#4654
date: 2024-01-02 00:06:55.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+body: "Oops yeah I just edited my comment, put the wrong symbol!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704169459 {#4719
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 {#4715 …}
+nested: Doctrine\ORM\PersistentCollection {#4711 …}
+votes: Doctrine\ORM\PersistentCollection {#4709 …}
+reports: Doctrine\ORM\PersistentCollection {#4724 …}
+favourites: Doctrine\ORM\PersistentCollection {#4726 …}
+notifications: Doctrine\ORM\PersistentCollection {#4728 …}
-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 {#4722
date: 2024-01-02 05:24:19.0 +01:00
}
} |
|
Show voter details
|
53 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
54 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4679
+user: Proxies\__CG__\App\Entity\User {#4680 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4676
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 {#4681 …}
+nested: Doctrine\ORM\PersistentCollection {#4683 …}
+votes: Doctrine\ORM\PersistentCollection {#4685 …}
+reports: Doctrine\ORM\PersistentCollection {#4687 …}
+favourites: Doctrine\ORM\PersistentCollection {#4689 …}
+notifications: Doctrine\ORM\PersistentCollection {#4691 …}
-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 {#4677
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4678
date: 2024-01-02 05:04:02.0 +01:00
}
} |
|
Show voter details
|
55 |
DENIED
|
edit
|
App\Entity\EntryComment {#4679
+user: Proxies\__CG__\App\Entity\User {#4680 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4676
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 {#4681 …}
+nested: Doctrine\ORM\PersistentCollection {#4683 …}
+votes: Doctrine\ORM\PersistentCollection {#4685 …}
+reports: Doctrine\ORM\PersistentCollection {#4687 …}
+favourites: Doctrine\ORM\PersistentCollection {#4689 …}
+notifications: Doctrine\ORM\PersistentCollection {#4691 …}
-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 {#4677
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4678
date: 2024-01-02 05:04:02.0 +01:00
}
} |
|
Show voter details
|
56 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4679
+user: Proxies\__CG__\App\Entity\User {#4680 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4676
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 {#4681 …}
+nested: Doctrine\ORM\PersistentCollection {#4683 …}
+votes: Doctrine\ORM\PersistentCollection {#4685 …}
+reports: Doctrine\ORM\PersistentCollection {#4687 …}
+favourites: Doctrine\ORM\PersistentCollection {#4689 …}
+notifications: Doctrine\ORM\PersistentCollection {#4691 …}
-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 {#4677
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4678
date: 2024-01-02 05:04:02.0 +01:00
}
} |
|
Show voter details
|
57 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
58 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4732
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4679
+user: Proxies\__CG__\App\Entity\User {#4680 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4676
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 {#4681 …}
+nested: Doctrine\ORM\PersistentCollection {#4683 …}
+votes: Doctrine\ORM\PersistentCollection {#4685 …}
+reports: Doctrine\ORM\PersistentCollection {#4687 …}
+favourites: Doctrine\ORM\PersistentCollection {#4689 …}
+notifications: Doctrine\ORM\PersistentCollection {#4691 …}
-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 {#4677
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4678
date: 2024-01-02 05:04:02.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+body: "Oops sorry it’s `&`! `/` is find"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704169378 {#4730
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 {#4733 …}
+nested: Doctrine\ORM\PersistentCollection {#4735 …}
+votes: Doctrine\ORM\PersistentCollection {#4737 …}
+reports: Doctrine\ORM\PersistentCollection {#4739 …}
+favourites: Doctrine\ORM\PersistentCollection {#4741 …}
+notifications: Doctrine\ORM\PersistentCollection {#4743 …}
-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 {#4731
date: 2024-01-02 05:22:58.0 +01:00
}
} |
|
Show voter details
|
59 |
DENIED
|
edit
|
App\Entity\EntryComment {#4732
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4679
+user: Proxies\__CG__\App\Entity\User {#4680 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4676
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 {#4681 …}
+nested: Doctrine\ORM\PersistentCollection {#4683 …}
+votes: Doctrine\ORM\PersistentCollection {#4685 …}
+reports: Doctrine\ORM\PersistentCollection {#4687 …}
+favourites: Doctrine\ORM\PersistentCollection {#4689 …}
+notifications: Doctrine\ORM\PersistentCollection {#4691 …}
-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 {#4677
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4678
date: 2024-01-02 05:04:02.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+body: "Oops sorry it’s `&`! `/` is find"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704169378 {#4730
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 {#4733 …}
+nested: Doctrine\ORM\PersistentCollection {#4735 …}
+votes: Doctrine\ORM\PersistentCollection {#4737 …}
+reports: Doctrine\ORM\PersistentCollection {#4739 …}
+favourites: Doctrine\ORM\PersistentCollection {#4741 …}
+notifications: Doctrine\ORM\PersistentCollection {#4743 …}
-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 {#4731
date: 2024-01-02 05:22:58.0 +01:00
}
} |
|
Show voter details
|
60 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4732
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4679
+user: Proxies\__CG__\App\Entity\User {#4680 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4624
+user: Proxies\__CG__\App\Entity\User {#4625 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4052
+user: App\Entity\User {#4105 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4072
date: 2024-03-17 10:38:16.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4051 …}
+nested: Doctrine\ORM\PersistentCollection {#4049 …}
+votes: Doctrine\ORM\PersistentCollection {#4047 …}
+reports: Doctrine\ORM\PersistentCollection {#4045 …}
+favourites: Doctrine\ORM\PersistentCollection {#4043 …}
+notifications: Doctrine\ORM\PersistentCollection {#4102 …}
-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 {#4075
date: 2024-01-01 20:02:17.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4621
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 {#4626 …}
+nested: Doctrine\ORM\PersistentCollection {#4628 …}
+votes: Doctrine\ORM\PersistentCollection {#4630 …}
+reports: Doctrine\ORM\PersistentCollection {#4632 …}
+favourites: Doctrine\ORM\PersistentCollection {#4634 …}
+notifications: Doctrine\ORM\PersistentCollection {#4636 …}
-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 {#4622
date: 2024-03-17 10:33:58.0 +01:00
}
+createdAt: DateTimeImmutable @1704141260 {#4623
date: 2024-01-01 21:34:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+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 {#4676
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 {#4681 …}
+nested: Doctrine\ORM\PersistentCollection {#4683 …}
+votes: Doctrine\ORM\PersistentCollection {#4685 …}
+reports: Doctrine\ORM\PersistentCollection {#4687 …}
+favourites: Doctrine\ORM\PersistentCollection {#4689 …}
+notifications: Doctrine\ORM\PersistentCollection {#4691 …}
-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 {#4677
date: 2024-03-17 08:27:45.0 +01:00
}
+createdAt: DateTimeImmutable @1704168242 {#4678
date: 2024-01-02 05:04:02.0 +01:00
}
}
+root: App\Entity\EntryComment {#4052}
+body: "Oops sorry it’s `&`! `/` is find"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1704169378 {#4730
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 {#4733 …}
+nested: Doctrine\ORM\PersistentCollection {#4735 …}
+votes: Doctrine\ORM\PersistentCollection {#4737 …}
+reports: Doctrine\ORM\PersistentCollection {#4739 …}
+favourites: Doctrine\ORM\PersistentCollection {#4741 …}
+notifications: Doctrine\ORM\PersistentCollection {#4743 …}
-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 {#4731
date: 2024-01-02 05:22:58.0 +01:00
}
} |
|
Show voter details
|
61 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
62 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4167
+user: App\Entity\User {#4180 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4161
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 {#4168 …}
+nested: Doctrine\ORM\PersistentCollection {#4170 …}
+votes: Doctrine\ORM\PersistentCollection {#4172 …}
+reports: Doctrine\ORM\PersistentCollection {#4174 …}
+favourites: Doctrine\ORM\PersistentCollection {#4176 …}
+notifications: Doctrine\ORM\PersistentCollection {#4178 …}
-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 {#4162
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4163
date: 2024-01-01 19:27:11.0 +01:00
}
} |
|
Show voter details
|
63 |
DENIED
|
edit
|
App\Entity\EntryComment {#4167
+user: App\Entity\User {#4180 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4161
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 {#4168 …}
+nested: Doctrine\ORM\PersistentCollection {#4170 …}
+votes: Doctrine\ORM\PersistentCollection {#4172 …}
+reports: Doctrine\ORM\PersistentCollection {#4174 …}
+favourites: Doctrine\ORM\PersistentCollection {#4176 …}
+notifications: Doctrine\ORM\PersistentCollection {#4178 …}
-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 {#4162
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4163
date: 2024-01-01 19:27:11.0 +01:00
}
} |
|
Show voter details
|
64 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4167
+user: App\Entity\User {#4180 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4161
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 {#4168 …}
+nested: Doctrine\ORM\PersistentCollection {#4170 …}
+votes: Doctrine\ORM\PersistentCollection {#4172 …}
+reports: Doctrine\ORM\PersistentCollection {#4174 …}
+favourites: Doctrine\ORM\PersistentCollection {#4176 …}
+notifications: Doctrine\ORM\PersistentCollection {#4178 …}
-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 {#4162
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4163
date: 2024-01-01 19:27:11.0 +01:00
}
} |
|
Show voter details
|
65 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
66 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4608
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4167
+user: App\Entity\User {#4180 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4161
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 {#4168 …}
+nested: Doctrine\ORM\PersistentCollection {#4170 …}
+votes: Doctrine\ORM\PersistentCollection {#4172 …}
+reports: Doctrine\ORM\PersistentCollection {#4174 …}
+favourites: Doctrine\ORM\PersistentCollection {#4176 …}
+notifications: Doctrine\ORM\PersistentCollection {#4178 …}
-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 {#4162
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4163
date: 2024-01-01 19:27:11.0 +01:00
}
}
+root: App\Entity\EntryComment {#4167}
+body: "Elegant and flexible, thank you!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704163513 {#4606
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 {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-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 {#4607
date: 2024-01-02 03:45:13.0 +01:00
}
} |
|
Show voter details
|
67 |
DENIED
|
edit
|
App\Entity\EntryComment {#4608
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4167
+user: App\Entity\User {#4180 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4161
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 {#4168 …}
+nested: Doctrine\ORM\PersistentCollection {#4170 …}
+votes: Doctrine\ORM\PersistentCollection {#4172 …}
+reports: Doctrine\ORM\PersistentCollection {#4174 …}
+favourites: Doctrine\ORM\PersistentCollection {#4176 …}
+notifications: Doctrine\ORM\PersistentCollection {#4178 …}
-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 {#4162
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4163
date: 2024-01-01 19:27:11.0 +01:00
}
}
+root: App\Entity\EntryComment {#4167}
+body: "Elegant and flexible, thank you!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704163513 {#4606
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 {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-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 {#4607
date: 2024-01-02 03:45:13.0 +01:00
}
} |
|
Show voter details
|
68 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4608
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+image: null
+parent: App\Entity\EntryComment {#4167
+user: App\Entity\User {#4180 …}
+entry: App\Entity\Entry {#2480}
+magazine: App\Entity\Magazine {#263}
+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 {#4161
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 {#4168 …}
+nested: Doctrine\ORM\PersistentCollection {#4170 …}
+votes: Doctrine\ORM\PersistentCollection {#4172 …}
+reports: Doctrine\ORM\PersistentCollection {#4174 …}
+favourites: Doctrine\ORM\PersistentCollection {#4176 …}
+notifications: Doctrine\ORM\PersistentCollection {#4178 …}
-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 {#4162
date: 2024-03-16 01:23:05.0 +01:00
}
+createdAt: DateTimeImmutable @1704133631 {#4163
date: 2024-01-01 19:27:11.0 +01:00
}
}
+root: App\Entity\EntryComment {#4167}
+body: "Elegant and flexible, thank you!"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1704163513 {#4606
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 {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-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 {#4607
date: 2024-01-02 03:45:13.0 +01:00
}
} |
|
Show voter details
|
69 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
70 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4240
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4235
date: 2024-01-02 04:20:43.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4241 …}
+nested: Doctrine\ORM\PersistentCollection {#4243 …}
+votes: Doctrine\ORM\PersistentCollection {#4245 …}
+reports: Doctrine\ORM\PersistentCollection {#4247 …}
+favourites: Doctrine\ORM\PersistentCollection {#4249 …}
+notifications: Doctrine\ORM\PersistentCollection {#4251 …}
-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 {#4236
date: 2024-01-02 04:20:43.0 +01:00
}
} |
|
Show voter details
|
71 |
DENIED
|
edit
|
App\Entity\EntryComment {#4240
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4235
date: 2024-01-02 04:20:43.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4241 …}
+nested: Doctrine\ORM\PersistentCollection {#4243 …}
+votes: Doctrine\ORM\PersistentCollection {#4245 …}
+reports: Doctrine\ORM\PersistentCollection {#4247 …}
+favourites: Doctrine\ORM\PersistentCollection {#4249 …}
+notifications: Doctrine\ORM\PersistentCollection {#4251 …}
-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 {#4236
date: 2024-01-02 04:20:43.0 +01:00
}
} |
|
Show voter details
|
72 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4240
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4235
date: 2024-01-02 04:20:43.0 +01:00
}
+ip: null
+tags: [
"323232"
]
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4241 …}
+nested: Doctrine\ORM\PersistentCollection {#4243 …}
+votes: Doctrine\ORM\PersistentCollection {#4245 …}
+reports: Doctrine\ORM\PersistentCollection {#4247 …}
+favourites: Doctrine\ORM\PersistentCollection {#4249 …}
+notifications: Doctrine\ORM\PersistentCollection {#4251 …}
-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 {#4236
date: 2024-01-02 04:20:43.0 +01:00
}
} |
|
Show voter details
|
73 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
74 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4256
+user: App\Entity\User {#4269 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4239
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 {#4257 …}
+nested: Doctrine\ORM\PersistentCollection {#4259 …}
+votes: Doctrine\ORM\PersistentCollection {#4261 …}
+reports: Doctrine\ORM\PersistentCollection {#4263 …}
+favourites: Doctrine\ORM\PersistentCollection {#4265 …}
+notifications: Doctrine\ORM\PersistentCollection {#4267 …}
-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 {#4238
date: 2024-03-17 04:00:47.0 +01:00
}
+createdAt: DateTimeImmutable @1704161174 {#4237
date: 2024-01-02 03:06:14.0 +01:00
}
} |
|
Show voter details
|
75 |
DENIED
|
edit
|
App\Entity\EntryComment {#4256
+user: App\Entity\User {#4269 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4239
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 {#4257 …}
+nested: Doctrine\ORM\PersistentCollection {#4259 …}
+votes: Doctrine\ORM\PersistentCollection {#4261 …}
+reports: Doctrine\ORM\PersistentCollection {#4263 …}
+favourites: Doctrine\ORM\PersistentCollection {#4265 …}
+notifications: Doctrine\ORM\PersistentCollection {#4267 …}
-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 {#4238
date: 2024-03-17 04:00:47.0 +01:00
}
+createdAt: DateTimeImmutable @1704161174 {#4237
date: 2024-01-02 03:06:14.0 +01:00
}
} |
|
Show voter details
|
76 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4256
+user: App\Entity\User {#4269 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4239
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 {#4257 …}
+nested: Doctrine\ORM\PersistentCollection {#4259 …}
+votes: Doctrine\ORM\PersistentCollection {#4261 …}
+reports: Doctrine\ORM\PersistentCollection {#4263 …}
+favourites: Doctrine\ORM\PersistentCollection {#4265 …}
+notifications: Doctrine\ORM\PersistentCollection {#4267 …}
-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 {#4238
date: 2024-03-17 04:00:47.0 +01:00
}
+createdAt: DateTimeImmutable @1704161174 {#4237
date: 2024-01-02 03:06:14.0 +01:00
}
} |
|
Show voter details
|
77 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
78 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4329
+user: App\Entity\User {#4342 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4324
date: 2024-01-02 00:05:51.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4330 …}
+nested: Doctrine\ORM\PersistentCollection {#4332 …}
+votes: Doctrine\ORM\PersistentCollection {#4334 …}
+reports: Doctrine\ORM\PersistentCollection {#4336 …}
+favourites: Doctrine\ORM\PersistentCollection {#4338 …}
+notifications: Doctrine\ORM\PersistentCollection {#4340 …}
-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 {#4325
date: 2024-01-02 00:05:51.0 +01:00
}
} |
|
Show voter details
|
79 |
DENIED
|
edit
|
App\Entity\EntryComment {#4329
+user: App\Entity\User {#4342 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4324
date: 2024-01-02 00:05:51.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4330 …}
+nested: Doctrine\ORM\PersistentCollection {#4332 …}
+votes: Doctrine\ORM\PersistentCollection {#4334 …}
+reports: Doctrine\ORM\PersistentCollection {#4336 …}
+favourites: Doctrine\ORM\PersistentCollection {#4338 …}
+notifications: Doctrine\ORM\PersistentCollection {#4340 …}
-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 {#4325
date: 2024-01-02 00:05:51.0 +01:00
}
} |
|
Show voter details
|
80 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4329
+user: App\Entity\User {#4342 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4324
date: 2024-01-02 00:05:51.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4330 …}
+nested: Doctrine\ORM\PersistentCollection {#4332 …}
+votes: Doctrine\ORM\PersistentCollection {#4334 …}
+reports: Doctrine\ORM\PersistentCollection {#4336 …}
+favourites: Doctrine\ORM\PersistentCollection {#4338 …}
+notifications: Doctrine\ORM\PersistentCollection {#4340 …}
-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 {#4325
date: 2024-01-02 00:05:51.0 +01:00
}
} |
|
Show voter details
|
81 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
82 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4403
+user: App\Entity\User {#4416 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4397
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 {#4404 …}
+nested: Doctrine\ORM\PersistentCollection {#4406 …}
+votes: Doctrine\ORM\PersistentCollection {#4408 …}
+reports: Doctrine\ORM\PersistentCollection {#4410 …}
+favourites: Doctrine\ORM\PersistentCollection {#4412 …}
+notifications: Doctrine\ORM\PersistentCollection {#4414 …}
-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 {#4398
date: 2024-03-17 00:19:44.0 +01:00
}
+createdAt: DateTimeImmutable @1704150026 {#4399
date: 2024-01-02 00:00:26.0 +01:00
}
} |
|
Show voter details
|
83 |
DENIED
|
edit
|
App\Entity\EntryComment {#4403
+user: App\Entity\User {#4416 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4397
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 {#4404 …}
+nested: Doctrine\ORM\PersistentCollection {#4406 …}
+votes: Doctrine\ORM\PersistentCollection {#4408 …}
+reports: Doctrine\ORM\PersistentCollection {#4410 …}
+favourites: Doctrine\ORM\PersistentCollection {#4412 …}
+notifications: Doctrine\ORM\PersistentCollection {#4414 …}
-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 {#4398
date: 2024-03-17 00:19:44.0 +01:00
}
+createdAt: DateTimeImmutable @1704150026 {#4399
date: 2024-01-02 00:00:26.0 +01:00
}
} |
|
Show voter details
|
84 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4403
+user: App\Entity\User {#4416 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4397
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 {#4404 …}
+nested: Doctrine\ORM\PersistentCollection {#4406 …}
+votes: Doctrine\ORM\PersistentCollection {#4408 …}
+reports: Doctrine\ORM\PersistentCollection {#4410 …}
+favourites: Doctrine\ORM\PersistentCollection {#4412 …}
+notifications: Doctrine\ORM\PersistentCollection {#4414 …}
-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 {#4398
date: 2024-03-17 00:19:44.0 +01:00
}
+createdAt: DateTimeImmutable @1704150026 {#4399
date: 2024-01-02 00:00:26.0 +01:00
}
} |
|
Show voter details
|
85 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
86 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4477
+user: App\Entity\User {#4490 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4472
date: 2024-01-01 21:32:04.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4478 …}
+nested: Doctrine\ORM\PersistentCollection {#4480 …}
+votes: Doctrine\ORM\PersistentCollection {#4482 …}
+reports: Doctrine\ORM\PersistentCollection {#4484 …}
+favourites: Doctrine\ORM\PersistentCollection {#4486 …}
+notifications: Doctrine\ORM\PersistentCollection {#4488 …}
-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 {#4473
date: 2024-01-01 21:32:04.0 +01:00
}
} |
|
Show voter details
|
87 |
DENIED
|
edit
|
App\Entity\EntryComment {#4477
+user: App\Entity\User {#4490 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4472
date: 2024-01-01 21:32:04.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4478 …}
+nested: Doctrine\ORM\PersistentCollection {#4480 …}
+votes: Doctrine\ORM\PersistentCollection {#4482 …}
+reports: Doctrine\ORM\PersistentCollection {#4484 …}
+favourites: Doctrine\ORM\PersistentCollection {#4486 …}
+notifications: Doctrine\ORM\PersistentCollection {#4488 …}
-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 {#4473
date: 2024-01-01 21:32:04.0 +01:00
}
} |
|
Show voter details
|
88 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4477
+user: App\Entity\User {#4490 …}
+entry: App\Entity\Entry {#2480
+user: Proxies\__CG__\App\Entity\User {#1966 …}
+magazine: App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1900 …}
+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 {#2420
date: 2024-06-25 00:10:28.0 +02:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1905 …}
+votes: Doctrine\ORM\PersistentCollection {#1934 …}
+reports: Doctrine\ORM\PersistentCollection {#1929 …}
+favourites: Doctrine\ORM\PersistentCollection {#1396 …}
+notifications: Doctrine\ORM\PersistentCollection {#2439 …}
+badges: Doctrine\ORM\PersistentCollection {#2357 …}
+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 {#1816
date: 2024-03-15 12:13:34.0 +01:00
}
+createdAt: DateTimeImmutable @1704131640 {#2419
date: 2024-01-01 18:54:00.0 +01:00
}
}
+magazine: App\Entity\Magazine {#263}
+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 {#4472
date: 2024-01-01 21:32:04.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@canadaduane@lemmy.ca"
]
+children: Doctrine\ORM\PersistentCollection {#4478 …}
+nested: Doctrine\ORM\PersistentCollection {#4480 …}
+votes: Doctrine\ORM\PersistentCollection {#4482 …}
+reports: Doctrine\ORM\PersistentCollection {#4484 …}
+favourites: Doctrine\ORM\PersistentCollection {#4486 …}
+notifications: Doctrine\ORM\PersistentCollection {#4488 …}
-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 {#4473
date: 2024-01-01 21:32:04.0 +01:00
}
} |
|
Show voter details
|
89 |
DENIED
|
edit
|
App\Entity\Magazine {#263
+icon: Proxies\__CG__\App\Entity\Image {#244 …}
+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 {#273
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#235 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#231 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#220 …}
+entries: Doctrine\ORM\PersistentCollection {#178 …}
+posts: Doctrine\ORM\PersistentCollection {#136 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#198 …}
+bans: Doctrine\ORM\PersistentCollection {#115 …}
+reports: Doctrine\ORM\PersistentCollection {#101 …}
+badges: Doctrine\ORM\PersistentCollection {#79 …}
+logs: Doctrine\ORM\PersistentCollection {#69 …}
+awards: Doctrine\ORM\PersistentCollection {#1830 …}
+categories: Doctrine\ORM\PersistentCollection {#1863 …}
-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 {#267
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#269
date: 2023-11-02 13:51:08.0 +01:00
}
} |
|
Show voter details
|