Locating files on linux using find

A very powerful tool on linux systems is the find command. It is used to locate file in the system across directories.

example:

amit@texens:~$ find

It takes in the location to be searched, and the criteria. It can search using criteria such as file name, owner, group, file permission, last edit time etc. It is recursive in nature, that is it looks into the folders recursively.

example:

amit@texens:~$ find . -name foobar

will list all the files with the name foobar.

See manpage for find for more information.

Note: grep is different from find in the way that grep looks for content inside the files wheras find locates files itself and not the content inside them.

Leave a comment