This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: ps with command line arguments
- From: Warren Young <warren at etr-usa dot com>
- To: Cygwin-L <cygwin at cygwin dot com>
- Date: Tue, 07 May 2013 08:39:51 -0600
- Subject: Re: ps with command line arguments
- References: <ADAB05FC-DE25-4BEC-9362-081C5046E57A at gmail dot com>
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