67

What is the difference between

ps -ef | grep thin  

and

ps aux | grep thin

As per the output there is a variation but i'm not clear what are the things being listed.

2

2 Answers 2

71

Both list all processes of all users. In that aspect -e and ax are completely equivalent.

Where they differ is output format specifier, -f is "full", while u is "user-oriented". The displayed columns are different:

  • columns for ps -f

UID PID PPID C STIME TTY TIME CMD

  • columns for ps u

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

1
  • 9
    This answer would be greatly improved by a definition for each of the column headers, or at least for the relatively non-obvious ones like "C" and "VSZ."
    – Wildcard
    Oct 25, 2016 at 19:42
19

There are no differences in the output because the meanings are the same.

The difference between ps -ef and ps aux is due to historical divergences between POSIX and BSD systems. At the beginning, POSIX accepted the -ef while the BSD accepted only the aux form.

Today, both systems accept the two forms.

1
  • 7
    Technically he is asking WHAT those differences are ;)
    – Rinzwind
    May 2, 2012 at 10:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .