What does "ps -ef|grep processname" mean?
-e
and -f
are options to the ps
command, and pipes take the output of one command and pass it as the input to another. Here is a full breakdown of this command:
-
ps
- list processes -
-e
- show all processes, not just those belonging to the user -
-f
- show processes in full format (more detailed than default) -
command 1 | command 2
- pass output of command 1 as input to command 2 -
grep
find lines containing a pattern -
processname
- the pattern forgrep
to search for in the output ofps -ef
So altogether
ps -ef | grep processname
means: look for lines containing processname
in a detailed overview/snapshot of all current processes, and display those lines