Ever so often I want to find a particular process on the system. I've always accomplished this by doing ps -ef | grep PROCESS_NAME
.
Today, I stumpled upon a new command by coincidence. The pgrep
command. By spending a few minutes reading its documentation (man pgrep
) I realized what it's capable of.
Run pgrep -i PROCESS_NAME
to find processes. The -i
flag tells pgrep to perform case insensitive matching.
Run pgrep -ilf PROCESS_NAME
to get long output, including the argument list of the matching process.
From now, this is what I'll be using.
Happy hacking!
GitHub: KevinSjoberg | Twitter: KevinSjoberg