Posts Tagged ‘locate’

Command not found on updatedb on Mac OSX Lion

Tuesday, October 23rd, 2012 | Life, Tech

If you’re running Mac OSX Lion and trying to update your locate db, you may get the following error message.

-bash: updatedb: command not found

You can call updatedb by using its full path instead.

/usr/libexec/locate.updatedb

You could also create a symlink in your bin directory which would then allow you to just call updatedb as normal.

Using locate to search for files from the terminal

Sunday, April 15th, 2012 | Life, Tech

Need to locate a specific file somewhere on your system? Luckily, there is an appropriated named search tool which you can use to do that. It’s called locate and it’s very similar to file search in Windows file manager.

Not all Linux installs come with locate, so you may need to install it.

yum install locate

Also, the first time you run it, it will need to build the database, so that will take a little longer. But once it is up and running, it is pretty fast. Simply use the command followed by a file name, or even just part of a file name, to get a list of all the files on your system that match.

locate httpd.conf