"ps aux" outputs the following as the first line:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND

how can I preserve this line if I do a "ps aux | grep <someuser>" so that I can still see the header for each column?

In essence, I want to grep all but the first line of the initial "ps aux" output.

ok, I answered my own question. haha

ps aux | egrep '<someuser>|USER'

I had to use egrep and single quote the string with the OR (|)

ps supports and option "h" (not -h) that suppresses the header from getting printed.
See "OUTPUT FORMAT CONTROL" section in "man ps".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.