Hi
I'm logged in at the moment, how do I find my process id for the shell I'm in, given that there are loads of other shells aswell. I'm using bash?
Thanks Dan
ps aux | grep -i dan.track
dan.track = user name
On Fri, Aug 29, 2008 at 5:10 PM, Dan Track dan.track@gmail.com wrote:
Hi
I'm logged in at the moment, how do I find my process id for the shell I'm in, given that there are loads of other shells aswell. I'm using bash?
Thanks Dan
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
On Fri, Aug 29, 2008 at 3:17 PM, Ed Greshko Ed.Greshko@greshko.com wrote:
Dan Track wrote:
Hi
I'm logged in at the moment, how do I find my process id for the shell I'm in, given that there are loads of other shells aswell. I'm using bash?
For a bash shell....
echo $$
Ed
Hi
Thanks that did it.
Dan
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Dan Track wrote:
Hi
I'm logged in at the moment, how do I find my process id for the shell I'm in, given that there are loads of other shells aswell. I'm using bash?
Thanks Dan
Hi,
What about ps -ef | grep -i bash ? If you get something like this, then you can find out the process id of all the shells.
$ ps -ef | grep -i bash
2872 2699 0 10:38 ? 00:00:00 /bin/bash /etc/gdm/Xsession gnome-session 2895 2699 0 10:38 ? 00:00:00 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "gnome-session" 4766 4763 1 11:07 pts/1 00:00:00 bash 4808 4763 1 11:07 pts/2 00:00:00 bash 4818 4763 1 11:07 pts/3 00:00:00 bash 4827 4763 1 11:07 pts/4 00:00:00 bash 4838 4763 1 11:07 pts/5 00:00:00 bash 4977 4766 0 11:07 pts/1 00:00:00 grep -i bash
Hope that was what you were looking for.
Regards, Amit.
Amitakhya Phukan wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Dan Track wrote:
Hi
I'm logged in at the moment, how do I find my process id for the shell I'm in, given that there are loads of other shells aswell. I'm using bash?
Thanks Dan
Hi,
What about ps -ef | grep -i bash ? If you get something like this, then you can find out the process id of all the shells.
$ ps -ef | grep -i bash
echo $$
2872 2699 0 10:38 ? 00:00:00 /bin/bash /etc/gdm/Xsession gnome-session 2895 2699 0 10:38 ? 00:00:00 /usr/bin/ssh-agent /bin/sh -c exec -l /bin/bash -c "gnome-session" 4766 4763 1 11:07 pts/1 00:00:00 bash 4808 4763 1 11:07 pts/2 00:00:00 bash 4818 4763 1 11:07 pts/3 00:00:00 bash 4827 4763 1 11:07 pts/4 00:00:00 bash 4838 4763 1 11:07 pts/5 00:00:00 bash 4977 4766 0 11:07 pts/1 00:00:00 grep -i bash
Hope that was what you were looking for.
Regards, Amit. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAki7gAYACgkQisV6fTFpwA2M/ACgzqk40jYgN4piotX+bBhlWPtQ wwAAoKdFosnaedBFAzTPT8VG269fiXwu =UjFz -----END PGP SIGNATURE-----