Finding files on unix and linux Find is an extremely useful command for finding files. It searches based a specified condition at a specified directory and descends into all subdirectories of the specified directory. You must always specify a directory and a condition. Files offers lots of very powerful options which allow you to precisely define your search criteria. Following are the most useful ones:-exec command \;Run unix command on each file matched by find, provided that it can execute successfully on that file.-followFollow symbolic links and track visited directories.-group gnameFind files belonging to group gname.-mtimeFind files which were modifed +n or -n days ago.-name patternFind files whose names match some pattern.-printPrint results using absolute pathnames.-type handleFind files whose type is handle. Handle can be f for plain file, d for directory, l for symbolic link, etc.-user userFind files belonging to certain user.

Some Examples List all files named myfile in you home directory

find $HOME -name myfile -print

List all files beginning with ca in the project directory

find /project -type f -name ´ca*´ -print

Seach the filesystem for manpage directories

find / -type d -name ´man´ -print

Remove all empty files

find / -size 0 -ok rm  \;

Find all files modified within the last 90 days

find / -mtime -90 -print

To find executable files, you should use which or whereis commands. Some Linux versions offer GNU locate to find files. All versions of Unix and Linux fully support the find command.