[Glastonbury] Finding files (was Re: New to it)

Ian Dickinson ian_j_dickinson at yahoo.co.uk
Sat Dec 18 12:25:09 GMT 2004


Sean suggested:
> cd /
> find . -name 'firefox' -print

> This will search your entire filesystem for any
> file(s) called firefox.
It will also give warnings for directories you don't
have permission to cd into, so a tweak would be:

find . -name firefox -print 2>&/dev/null

which directs everything on stderr to the bit bucket.
BUT an even better solution imho is to use slocate.

For those that don't know it, slocate is a service
that builds a catalogue of all the files on your
system.  It's automatically installed on Fedora Core
(and RedHat, afaik) - I can't speak for other distros.
 However, the database may not be being built by
default.

Try:
slocate man

This should give you tons or results. If this doesn't
give you any results, then the slocate catalogue isn't
built.  As root, you can rebuild the catalogue with

updatedb

On my system, updatedb is run automatically once a day
by cron. See the entry in /etc/cron.daily.  There are
a bunch of options to slocate, all on the man page. 
But a simple

slocate firefox

lists every path on the system that contains the
string 'firefox', and it's a *lot* quicker than find
:-)

Hth,
Ian



		
___________________________________________________________ 
Win a castle for NYE with your mates and Yahoo! Messenger 
http://uk.messenger.yahoo.com



More information about the Glastonbury mailing list