You can use the find command to search a system for files or directories. The find command can be quite resource intensive as it trawls recursively through your file structure. Often a more suitable command is locate. See here for more information about the locate command.

As usual you should head to the manual pages to find out more.

man find

In its simplest form, you can use the find command like this.

find / -name myfile.txt

The ‘/’ is the directory to start recursively searching from. We use the ‘-name’ command line option to indicate we are searching on the files name. In this case the string we are searching for is myfile.txt.