![]() |
Need help filtering out threads in ps command output
Anyone know of a simple way to filter the threads out of the output of ps -u $USER command?
TIA for any answers. |
Filter for what? A text string? Try:
ps -u $USER | grep STRING |
no, not a particular string.
A multi-threaded process will show up n times if it has n-1 threads. I do not want to see that many instances of it in the ps output. thanks, |
something like this?
ps -ef | uniq --skip-fields=8 |
Thanks Double failure...
i was trying something like this...It also worked, but I think uniq might be more efficient. ps -o pid,tty,args `ps -u $USER -o ppid,pid | egrep '\b1\b' | awk '{print $2}'` | grep -v tcsh | grep -v 'ps -u' | grep -v grep | grep -v xterm |
| All times are GMT -5. The time now is 10:39 PM. |