Click to See Complete Forum and Search --> : how to search linux directories?


ejt
03-03-2001, 11:16 AM
what is the command to search all linux directories for a file, for instance:

find *mysql*

Thanks,
Edward Tanguay www.tanguay.de (http://www.tanguay.de)

stingray72
03-03-2001, 11:33 AM
try: locate mysql

Harvey
03-03-2001, 11:49 AM
if you're looking for binaries in your path.
whereis mysql

if you're looking for just anything anywhere you have permission to look...

find / -name mysql -print

it'll start looking in root, and dig around and show you everything called mysql.

to search more vaguely...
find / -name *.mp3 -print
or stuff like that.
pretty cool

Unruly
03-03-2001, 12:18 PM
if that's not working, try doing an:

updatedb

that updates the file listings that the locate command uses to search. *warning* it'll make your hard drive thrash for a few minutes (depending on size and number of files) and you'll see tons of CPU usage.

linuxluis
03-04-2001, 08:28 PM
Also you could do the locate command. but first do this

$locate -u (that updates the command on locate)

$locate mysql

it will show you all the things that have to do with mysql.

switch :cool: