[please keep the list in the loop, and please don't top-post on technical
lists]

According to Jan Girke on 2/12/2010 10:30 AM:
> Hi Eric
> 
> Unfortunately sort is no help at all
> (
> r...@computer:/# ps -e | sort

> unless you do that monster,
> "r...@computer:/# ps -eo "%c %y %U %p"|sort"
> but I haven't figured a way to sort the first list alphabetically.

That all depends on what you want to sort by.  For example, if you wanted
to sort by process names as the textual primary key, and process id as the
numeric secondary key, try:

ps -e | sort -k4,4 -k1,1n

> 
>> And how exactly do you propose mapping 'process name' back to a particular
>> process, when there may well be more than one process with the same argv0
>> running at the same time?
> 
> sort by name then tty, user, pid

How does that sorting solve determining which process you intended to kill?

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to