48

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.

52

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

  • 3
    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 '16 at 19:42
15

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.