Name
find [directories
] [expression
] — findutils
Synopsis
/usr/bin
stdin stdout - file -- opt --help --version
The find
command searches one or more directories (and their subdirectories recursively) for files matching certain criteria. It is very powerful, with over 50 options and, unfortunately, a rather unusual syntax. Here are some simple examples that search the entire file system from the root directory:
Find a particular file named myfile:
$ find / -type f -name myfile -print
Print all directory names:
$ find / -type d -print
Useful options | |
| The name ( |
| The path (relative to the directory tree being searched) must match the given regular expression. |
| Locate only plain files ( |
| File was last accessed ( |
| File was last accessed ( |
Get Linux Pocket Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.