[NTLUG:Discuss] What is this?

Hanna, Mark Mark.Hanna at FMR.com
Fri Jul 2 14:18:25 CDT 2004


The find command will give you MANY more options for what you are trying
(i.e. filesize, permissions, owner).  personally I don't like locate
because it it not supported across all flavors of *nix.  If I need to
see if a command is in my $PATH, I use "which" and if I need to know
where any file is, I use "find".  "locate" basically just lookups up the
filename in a datebase, where "find" activily searches all the
filesystems each time it is invoked.

If you use "ps -ef" (one of the more common forms of usage) will output
several lines with columns of information.  The first column is
obviously the userid of the process owner.  The next two columns are the
PID (Process ID) and the PPID (Parent Process ID).  The PPID will always
relate back to some other PID in the list.  You can find out which one
by typing "ps -ef | grep {PPID}".  This will give you the parent
process, all children processes and usually a line with the grep itself.
"ps -A" only gives the PID, the TTY session, CLOCK ticks and the command
name.

As for learning the ins and outs of the various commands, nothing really
beats humming through some of the man pages.  Thats how I learned all
the different command line arguments.  Find a command, read the man page
and then at the bottom where related commands are listed, go read those.
Man pages also typically have some good examples for how to use the
command.  

Another method is "man -k {some keyword}".  This will list all the man
pages that have {some keyword} in the header line.

And then of course you always have this mailing list and Google.  (Where
was Google when I was learning Unix? hahaha)


-----Original Message-----
From: Wayne Dahl [mailto:w.dahl4 at verizon.net]
Sent: Friday, July 02, 2004 1:59 PM
To: NTLUG Discussion List
Subject: RE: [NTLUG:Discuss] What is this?


Thanks Rev and Mark.  You've relieved my mind.  Now that you've told me
what is going on here, I recall a conversation on here from some time
back about using locate and making sure the locate database is updated
periodically.

Which brings me to another question.  The difference between find and
locate is that find has to actually check the files on the disk and
locate checks a database?  Is that what makes locate so much faster? 
I've pretty much given up on find in favor of locate because of the
speed difference. 


> are you familar with reading the processid and parentprocessid columns
> from the ps command?  that is usually a pretty good way of tracing
what
> process is running what.

I am familiar with recognizing the process id which is how I kill a
running hung process.  But I do NOT know how to tell the difference
between a parent and child process from the ps command.  I can't tell
which is which.  Perhaps I'm running it without the correct options?  I
usually run it as "ps -A".  Is there another option that would show the
parent/child process ids?


Heheheh...I'm showing my ignorance here, but this is good info for me
and the other Linux newbies on the list.  And even though I've been
using Linux now for a few years, I still consider myself a Linux newbie
because the amount of time I've had to learn it has been something akin
to punctuated equilibrium (in the evolutionary point of view).  I get
bursts of time to spend on it with very little in between.

Thanks for the help guys.

-- 
Wayne Dahl
Registered Linux User # 347549
No electrons were abused in any way by any Micro$oft 
product in the composition of this e-mail.


_______________________________________________
https://ntlug.org/mailman/listinfo/discuss



More information about the Discuss mailing list