utility
find
Traverse a tree; -type f selects regular files, -name matches a pattern, -exec ... {} + passes batches, -print0 emits NUL delimiters. Use owned roots.
Formal Syntax & Structure
bash syntaxbash
find START [EXPRESSION]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| START | path | Starting directory. |
| EXPRESSION | expression | Tests and actions. |
Return Value
exit status
Exit status 0 on success; nonzero indicates failure or a command-specific condition. See description and example.
Working Example
Example Snippetbash
mkdir dataprintf 'abc' > 'data/daily report.txt'find data -type f -name '*.txt' -exec wc -c {} +