cm0002@literature.cafe to Linux@programming.dev · 3 days agoWhat are some of your most useful or favorite terminal commands?message-squaremessage-square45linkfedilinkarrow-up145arrow-down13file-text
arrow-up142arrow-down1message-squareWhat are some of your most useful or favorite terminal commands?cm0002@literature.cafe to Linux@programming.dev · 3 days agomessage-square45linkfedilinkfile-text
minus-squareTrumpetX@programming.devlinkfedilinkEnglisharrow-up2·2 days agoI use awk instead of cut cause I can remember the syntax better. ps aux | grep zoom | grep -v grep | awk ‘{print $2}’ | xargs kill -9
minus-squarestewie410@programming.devlinkfedilinkarrow-up2·2 days agoYou can get rid of those greps, btw: ps aux | awk '/zoom/ && $0 !~ /awk/ {print $2}' Or just use pgrep.
minus-squareTrumpetX@programming.devlinkfedilinkEnglisharrow-up1·2 days agogrep is everywhere, pgrep is not
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up2·2 days agoThe greps were much more legible that this concoction 😅 But I second the use of pgrep. 👌 Better yet, just killall zoom.
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up1·2 days agoMay I interest you in the command killall? 😁
minus-squareTrumpetX@programming.devlinkfedilinkEnglisharrow-up1·2 days agoThe thing with killall is I can’t see what it’s going to do first. With the greps, I can look first, kill second.
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up1·1 day agoTrue, then I would personally run pgrep first, then killall. 😊
I use awk instead of cut cause I can remember the syntax better.
ps aux | grep zoom | grep -v grep | awk ‘{print $2}’ | xargs kill -9
You can get rid of those
greps, btw:Or just use
pgrep.grep is everywhere, pgrep is not
The greps were much more legible that this concoction 😅
But I second the use of pgrep. 👌
Better yet, just
killall zoom.May I interest you in the command
killall? 😁The thing with killall is I can’t see what it’s going to do first. With the greps, I can look first, kill second.
True, then I would personally run
pgrepfirst, thenkillall. 😊