![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 | Thread Starter | Forum | Replies | Last Post |
| option followed by : taking next option if argument missing with getopts | gurukottur | Shell Programming and Scripting | 2 | 03-17-2008 09:46 AM |
| what is gcc -e option in C | useless79 | High Level Programming | 3 | 12-05-2007 10:36 AM |
| su option | lesstjm | UNIX for Advanced & Expert Users | 1 | 11-02-2005 10:54 AM |
| -h option | Raom | UNIX for Advanced & Expert Users | 1 | 10-25-2005 10:19 PM |
| cut -f option | 435 Gavea | UNIX for Dummies Questions & Answers | 1 | 11-10-2003 02:50 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Good morning,
Using command Code:
root@slackware:~# ps -e -O sz --sort sz Code:
PID SZ S TTY TIME COMMAND ... 57 358 S ? 00:00:00 /usr/sbin/syslogd 60 347 S ? 00:00:00 /usr/sbin/klogd -c 3 -x 103 347 S ? 00:00:00 udevd 119 353 S ? 00:00:01 /sbin/dhcpcd -d -t 60 eth0 869 0 S ? 00:00:00 [khubd] 894 354 S ? 00:00:00 /usr/sbin/inetd 898 820 S ? 00:00:00 /usr/sbin/sshd 909 395 S ? 00:00:00 /usr/sbin/crond -l10 911 396 S ? 00:00:00 /usr/sbin/atd -b 15 -l 1 914 1362 S ? 00:00:05 sendmail: accepting connections 917 1270 S ? 00:00:00 sendmail: Queue runner@00:25:00 for /var/spool/c ... How can I sort the list by the SZ column ? Thank you in advance |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Jonas,
See if this would work for you: Code:
ps -e -o "osz pid s tty time comm" | head -1 ps -e -o "osz pid s tty time comm" | tail +2 | sort -n |
|
#3
|
|||
|
|||
|
Yes it works.
Thank you |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|