ps with command line arguments

Warren Young warren@etr-usa.com
Tue May 7 14:40:00 GMT 2013


On 5/7/2013 02:46, AZ 9901 wrote:
>
> This script uses "ps -ef" in particular to list all its instances.

Any script that relies on 'ps' output parsing is probably unportable 
from the get-go.

Your script will also fail on most FreeBSD machines, for example.  On 
FreeBSD, there is a kernel build option that is often set which prevents 
user space from *ever* seeing command line options.  It's a security 
feature, since there are all kinds of things you can learn about other 
users if you are allowed to see the parameters they pass to their commands.

That aside, you'll also find that different implementations of ps use 
different column orders, etc.

Still, if you *must* do this, you can install the 'procps' package.  Its 
procps.exe command behaves like ps on Linux.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list