Warning: bad syntax, perhaps a bogus ‘-’? See /usr/share/doc/procps-3.2.7/FAQ

by on January 14, 2009 · 0 comments· last updated at October 14, 2009

I type the following command:
ps -auxf | sort -nr -k 4 | head -10

And I get the output along with warning message:

Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.7/FAQ

How do I fix this problem?

To fix this problem change your command as follows:
ps auxf | sort -nr -k 4 | head -10

But why does "ps -aux" complain about a bogus '-'?

According to the POSIX and UNIX standards, the above command asks to display all processes with a TTY (generally the commands users are running) plus all processes owned by a user named "x". If that user doesn't exist, then ps will assume you really meant "ps aux". The warning is given to gently break you of a habit that will cause you trouble if a user named "x" were created. This is documented in /usr/share/doc/procps-3.2.7/FAQ file:
less /usr/share/doc/procps-3.2.7/FAQ



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: