The question is basic, How to get output of ps
with headers in Linux.
Linux details:
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
I can get it with ps -ef | { head -1; grep query; }
, but that is lot of text. When looking at docs of ps
using man ps
, I can see there is one option --headers
, but using that also does not give headers:
>~$ ps aux --headers | grep grep
user 24082 0.0 0.0 6656 628 pts/0 S+ 12:59 0:00 grep grep
Also tried option h
with the command:
~$ ps auxh | grep grep
user 25982 0.0 0.0 6656 624 pts/0 S+ 13:14 0:00 grep grep