Finding files on CentOS 5

I’m using the CentOS Linux distro for the first time for some Hadoop Big Data work and am having fun rediscovering the powerful *NIX shell.

An initial challenge I faced was being unable to search for files in the operating system as the “mlocate” package is not installed on CentOS 5 by default.

The below commands download the mlocate package, create a daily cron job to index my system and run a search for any file or folder with the string “Hadoop” in the name.   

$ sudo yum install mlocate
$ sudo /etc/cron.daily/mlocate.cron
$ locate mlocate.cron
$ locate updatedb
$ locate Hadoop | more

Advertisements