On Thu, 2003-07-24 at 20:58, Jack Bowling wrote: > ** Reply to message from Logan Linux <[EMAIL PROTECTED]> on Fri, 25 Jul 2003 > 11:46:13 +1000 > > > Hi all, > > > > Being a noob most of my time is taken up "hacking" commands that Ive pieced > > together from what Ive been gathering from the usual sources. > > > > Something I dont understand (forgive me) is the locate and find commands. > > > > Basically I want to > > dir nessus* /s > > ie. find all files and folders containing nessus and searching in all sub > > directories. > > > > I thought locate was doing that by default but I jynxed it today. > > Please help! > > Locate will only find a file if three things have occurred: > > 1) The package was installed on your system. > 2) The package was installed via rpm. > 2) The updatedb process has run before you did the locate command.
Jack I don't believe this is the case. locate and find are not part of rpm in any way other than the fact that the are installed via rpm on rpm based systems. The updatedb program is a symlink to slocate that I am assuming knows that if it is called as updatedb to actully run as if slocate -u was run. The updatedb program actually builds a database of every file on your system by recursing the entire local file structure This means that files containing the string nessus could be found by running locate nessus as long as the daily cron stuff was run since it was installed. This will work whether or not the file was installed via an rpm package. I use find to limit the search or when I want to do things like date, owner, perm stuff to use find to find the files something like find / -type f -name 'nessus*' this will start the search from the / dir man find and man locate does a fair job of explaining how to do it and info find goins into a bit more detail. HTH Bret the single quote keeps the shell from doing funky expansion things. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list