find test
An option to find that checks each entry, such as -name, -type f or -mtime, keeping only entries for which it is true.
In more detail
-name matches a glob against the file name and -iname ignores case. -type f, d and l select files, directories and links. Tests joined side by side must all pass, and -not reverses one.
Related terms
- find command — The find command, which walks a directory tree and prints, or acts on, every entry that passes its tests.
- modification time — The date and time a file's contents were last changed, stored with the file and shown by ls -l.
- glob pattern — A pattern that matches names using * for any run of characters, a question mark for one character and [abc] for one of a set.
Taught in
- Permissions And Ownership — Bash Scripting & Command Line Automation
- find And xargs — Bash Scripting & Command Line Automation
- Archives, Transfers And The Network — Bash Scripting & Command Line Automation
- Scheduling, Monitoring And A Script That Reports — Bash Scripting & Command Line Automation