LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2005, 03:44 PM   #1
Stepaj47
LQ Newbie
 
Registered: Oct 2005
Location: Buffalo, NY
Posts: 8

Rep: Reputation: 0
What is script PID information?


I have to write a script that collects user id and PID information, but I don't
know what PID means. Can anyone give me a brief explanation of what PID stands for, thanks.
 
Old 11-14-2005, 03:51 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
PID = Process IDentifier

man bash
/PID
for details



Cheers,
Tink
 
Old 11-14-2005, 04:03 PM   #3
Stepaj47
LQ Newbie
 
Registered: Oct 2005
Location: Buffalo, NY
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks.

If I want to display the just the PID information using the ps command in bash, how would I do that?
 
Old 11-14-2005, 04:21 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
The PID of what would be the first thing you should
try to find out ;)

And then of course there's friendly commands like cut
and awk that will let you post-process the information
out of ps if the built-in display options don't quite do
what you expect.

man ps
man cut
man awk

for details



Cheers,
Tink

P.S.: And since the question strongly reeks of homework
this is going to be as much support as you get, homework
questions are against our rules. If you run into an actual
problem with any of the commands above feel free to come
back and ask.
 
Old 11-15-2005, 07:46 AM   #5
Stepaj47
LQ Newbie
 
Registered: Oct 2005
Location: Buffalo, NY
Posts: 8

Original Poster
Rep: Reputation: 0
When I try to use the "pidof" command, bash says the command is not found.
How do I enable the "pidof" command in my bash shell?

Last edited by Stepaj47; 11-15-2005 at 08:13 AM.
 
Old 11-15-2005, 01:56 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
pidof is part of the sysinitV package in slackware, and
is in /sbin ... chances are that you can't see it as a normal
user in your distro, either. Have a look in /sbin, or see
whether it works as root.

If it doesn't, use ps and grep, gives you the same info
with slightly more work.


Cheers,
Tink
 
Old 11-15-2005, 02:21 PM   #7
Stepaj47
LQ Newbie
 
Registered: Oct 2005
Location: Buffalo, NY
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks, I checked in /sbin, and pidof was there, it was one of a few commands that was highlighted a different color, I am not sure what that means. Possibly that command is disabled?
 
Old 11-15-2005, 02:50 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Personally I don't use ls colorisation, and if I did the
meaning of the colours in your set-up might differ from
what my distro provides. The easiest way to find out
would be to try and run it ;}


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get PID info about a specific script? Stepaj47 Linux - Newbie 2 11-14-2005 04:31 PM
bash script, monitoring running PID? thebover Programming 4 08-26-2004 02:42 PM
obtaining PID of shell script sanjith11 Programming 3 07-14-2004 10:43 AM
small bash script to kill a PID flosch Linux - General 3 05-06-2004 09:28 PM
how to find the pid of a perl script from shell script toovato Linux - General 1 12-19-2003 06:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration