Posts

Showing posts with the label pid

List of PIDs only

I wanted a list of pids only so I could run them through a while loop for processing. To get just a list of pids on Linux I used: ps --no-headers -o pid -C processname

Get PID from running process

pgrep -f processname(i.e. vim, emacs, postgres, etc.)