Process ID

Submitted by Fabio Ivasse
on January 7, 2004 - 5:00am

How can I get a process ID number, without using "pidof".
I am running a LinuxPPC, with 2.4 kernel
I've tried: ps | grep process | cut -f1 -d" "; but if the pid lenght is less than 5, it only return a space char.

Thank you

Sollution

Mind Booster Noori
on
January 7, 2004 - 10:05am


ps x | grep telnet | cut -c1-5;

This will make the trick...

pgrep

Anonymous
on
January 7, 2004 - 11:02am

pgrep process
returns the pid(s) of process

Thanks... pgrep works great

Anonymous (not verified)
on
February 6, 2006 - 7:51am

Thanks... pgrep works great

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.