On Tue, 2006-02-21 at 09:12 -1000, Susemail wrote:
On Monday 20 February 2006 18:10, Ken Schneider wrote:
On Tue, 2006-02-21 at 02:52 +0100, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE-----
I'm not able to run any of these commands as root or myself:
I have a small script called psfind: ps auxf|grep -i $1|grep -iv grep
# ps auxf|grep -i $1|grep -iv grep Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information.
Ah! Interesting. I'll copypaste ;-)
[...]
Hum!
cer@nimrodel:~> psfind postfix root 8735 0.0 0.0 4384 192 ? Ss Feb11 0:20 /usr/lib/postfix/master postfix 17797 0.0 0.1 4584 556 ? S Feb17 0:02 \_ qmgr -l -t unix -u postfix 24242 0.0 0.2 4428 1480 ? S 02:38 0:00 \_ pickup -l -t unix -u cer 24392 0.0 0.2 2708 1176 pts/18 R+ 02:44 0:00 | \_ /bin/sh /usr/local/bin/psfind postfix
# psfind postfix bash: psfind: command not found
Hah, it's finding the script as well, it needs a refinement ;-p
This is one that I use...
ps auxww | grep -v grep | grep $*
# ps auxww | grep -v grep | grep $* Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information.
Am I doing something wrong? Jerome
Do you know what a script is? Apparently not. psfind is a file called psfind that contains ps auxf|grep -i $1|grep -iv grep and has the execute bit set. The script I use is called psg and contains ps auxww | grep -v grep | grep $* and slao has the execute bit set (hint: chmod +x psg or psfind). -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998