LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to pass parameters to Top command using command line. (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-pass-parameters-to-top-command-using-command-line-4175544869/)

pinga123 06-09-2015 12:23 AM

How to pass parameters to Top command using command line.
 
This is what we do in order to sort top output.
1) top
2) Press "f" (lower case) <== to enable/disable colums
3) Press the following keys "HIOQTWK" (upper case)
3b) Press "p" (lower case) <== to enable "swap" column
3c) Press "Enter" to complete
4) Press "F" (upper case) <== To sort by column
5) press "p" (lower case) <== sort by swap column
6) press "Enter" to complete.

However i was wondering if i can do all this using command line to save time .
Any link or help will be appreciated.

syg00 06-09-2015 12:43 AM

See the manpage - section 6b.
Set top up as you want it then issue a "W" to create the config file - it will get used in future. Can be updated in need.


All times are GMT -5. The time now is 09:34 AM.