1833582 Members
4483 Online
110061 Solutions
New Discussion

Process ID

 
SOLVED
Go to solution
Jonathan Caplette
Regular Advisor

Process ID

Hi guys...

I wanna know if I can get the PID of the job I've just launch... I know I can do ps -ef | grep but the thing is that job can be launch many times by a users, and I wanna know exactly what job do what... I don't know if you see what I meen...

Thanks
Jonathan
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: Process ID

Hi:

$$ is your shell.

$! is your last background process launched.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: Process ID

Hi Jonathan,

I think I understand your question. $! will give the pid of the last background process.
If it ain't broke, I can fix that.
harry d brown jr
Honored Contributor

Re: Process ID

Using "lsof" on a pid, you can see what files it has open.

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.55/

live free or die
harry
Live Free or Die
Jonathan Caplette
Regular Advisor

Re: Process ID

Ok thanks everyone.. this as worked perfectly...

ciao!