bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature Request kill and ps


From: Eric Blake
Subject: Re: Feature Request kill and ps
Date: Fri, 12 Feb 2010 13:06:04 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

[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
> (
> address@hidden:/# ps -e | sort

> unless you do that monster,
> "address@hidden:/# 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             address@hidden

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]