44
you are viewing a single comment's thread
view the rest of the comments
[-] TrumpetX@programming.dev 2 points 1 month ago

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

[-] stewie410@programming.dev 2 points 1 month ago

You can get rid of those greps, btw:

ps aux | awk '/zoom/ && $0 !~ /awk/ {print $2}'

Or just use pgrep.

[-] victorz@lemmy.world 2 points 1 month ago* (last edited 1 month ago)

The greps were much more legible that this concoction ๐Ÿ˜…

But I second the use of pgrep. ๐Ÿ‘Œ

Better yet, just killall zoom.

[-] TrumpetX@programming.dev 1 points 1 month ago* (last edited 1 month ago)

grep is everywhere, pgrep is not

[-] victorz@lemmy.world 1 points 1 month ago

May I interest you in the command killall? ๐Ÿ˜

[-] TrumpetX@programming.dev 1 points 1 month ago

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.

[-] victorz@lemmy.world 1 points 1 month ago

True, then I would personally run pgrep first, then killall. ๐Ÿ˜Š

this post was submitted on 16 Dec 2025
44 points (94.0% liked)

Linux

12090 readers
531 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS