The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-02-2008
Tytalus's Avatar
Tytalus Tytalus is offline
Registered User
 

Join Date: Jun 2003
Location: Scotland
Posts: 248
Code:
ps -ef -o pid,ppid,user,pcpu,stime,s,args | tail +2 |sort -nr +3
should do you (note, I rearranged your order slightly to put the command at the end to avoid any issues with spaces/column counting for the sort)..and the "tail +2" is just to get rid of the header line.

If you just want your processes try:

Code:
 ps -fu $USER -o pid,ppid,user,pcpu,stime,s,args | tail +2 |sort -nr +3
HTH,
Reply With Quote