The Unix find command
The find
command is a convenient way to search for files on your machine through the command line.
The general form of the command is
find starting_directory match_criteria match_pattern output_action
Examples
Search through all directories on the machine
find / -name "pattern" -print
Breaking it down:
/
: start the search at the top-most directory-name
: we are searching by filename"pattern"
: the filename pattern being searched for. This can be an exact name (e.g.nginx.conf
) or a pattern (e.g.*.conf
)-print
: display the full pathname of all matching files