|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Limit process number in TOP command outupt
Linux top command prints more than 40 processes. Code:
top -b -n 1 > Top_Output.txt Is there a straight-forward option/way to limit only till the top 5 processes. ( Instead of using head, tail or other unix commands together) Last edited by vbe; 12-03-2012 at 09:35 AM.. Reason: Do you mind using code tags! |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
This is the solution: Code:
top -b 5 -n 1 In any way: top [N] where N is the number of the process, any other number after -n will be used as count number. Last edited by vbe; 12-03-2012 at 09:35 AM.. |
| Sponsored Links | ||
|
![]() |
| Tags |
| limit, lines, process, top |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using top command to email if process is exceeding 25% and sending an email alert if so | jay02 | Shell Programming and Scripting | 8 | 03-02-2012 11:36 AM |
| Top command in AIX 4.2 (no topas, no nmon, no top)? | Browser_ice | AIX | 1 | 07-04-2009 07:00 PM |
| Command to find TOP 5 Memory consuming process | bce_groups | AIX | 4 | 05-07-2009 05:09 PM |
| Number of long limit | herath | UNIX for Dummies Questions & Answers | 2 | 06-03-2008 02:31 AM |
| Xargs command outupt to file | byblos | Shell Programming and Scripting | 3 | 11-09-2007 11:34 AM |
|
|