|
|
#1
|
|||
|
|||
grep all but first line
"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 " so that I can still see the header for each column? In essence, I want to grep all but the first line...
__________________
Website Development Domain Name Forum |
#2
|
|||
|
|||
The -n +2 means “start passing through on the second line of output”. This is a quick hacky way: ls -lart. grep -v ^total . Basically, remove any lines that start with "total", which in ls output should only be the first line.
|
Thread Tools | |
Display Modes | |
|
|