Comment on Ask HN: What are your favorite one-liner shell commands you use?Comments−tmaly1yI use pgrep -fl <name> instead of ps to find running processes by name.For complex one liners, I keep them in a simple txt file with a brief description so I can find them later when I need to use them again.−rajkumarsekarOP1ySmart move with pgrep -fl—so much cleaner than piping through ps | grep. And keeping a personal cheat sheet of one-liners is underrated.
Comments
I use pgrep -fl <name> instead of ps to find running processes by name.
For complex one liners, I keep them in a simple txt file with a brief description so I can find them later when I need to use them again.
Smart move with pgrep -fl—so much cleaner than piping through ps | grep. And keeping a personal cheat sheet of one-liners is underrated.