Find command

From Linux Bash Shell Scripting Tutorial Wiki
Jump to navigation Jump to search

The find command searches through the content of one or more directories, including all of their subdirectories. You have to tell find from where to start the search.

$ find dir_name -name file_name -print

In this example dir_name is the name of directory from where you want to start the search and file_name is the name of file you want to search. The -name option is followed by the name of the file or also you can specify several files to search. The final option, -print tells find to print the full pathname of any matching file.