maux
Star on GitHub Buy me a coffee

Manual / find

find(1)

FIND(1) General Commands Manual FIND(1)

find - find files

find pathname [expression]

Find recursively descends the directory hierarchy from pathname seeking files that match a boolean expression written in the primaries given below. In numeric tests, +n means more than n, -n less than n, and n exactly n.

Match the entry's name against a shell pattern.
Match the whole walked pathname against a shell pattern.
Select ordinary files or directories.
Compare modification timestamps with the named reference file.
Compare modification age in calendar days, ignoring time of day. Without a usable clock this test is false.
Compare file length in rounded-up 512-byte units; append c for bytes.
Compare a link count of 1: ProDOS has no hard links.
Accepted; the traversal cannot cross a ProDOS volume boundary.
Accepted as constant true: there are no account or group databases.
Print the current pathname; true.
Do not descend into this directory; true.
True if the executed command returns exit status zero. The end of the command is punctuated by a quoted semicolon. A command argument '{}' is replaced by the current pathname.
Like -exec, but first write < command ... pathname > ? to the standard error and read one reply line from the terminal (the standard error, which stays the console when the standard input is a file). The command runs only if the reply begins with y or Y; otherwise the primary is false and nothing runs. Where standard error is not a terminal every reply is taken as no.
Always true. Act on the entries of a directory before the directory itself, so a tree is listed deepest first. -prune has no effect when -depth is given.

The operators, in decreasing precedence, are ! (not), -a (and, also implied by adjacency), and -o (or). And/or short-circuit; parentheses group expressions. Quote parentheses, pattern metacharacters and the semicolon for the shell:

find . -name '*.S' -exec echo '{}' ';'

If there is no -print, -exec or -ok, a -print is implicitly ANDed with the complete expression.

/usr/man/FIND this page

sh(1), ls(1), licenses(1)

Exit status is 0 on a successful walk, 1 for access/path/spawn failures, 2 for syntax, complexity or traversal-depth errors. A child's nonzero -exec status makes that primary false, not itself an execution failure.

One starting path is accepted. The walk is limited to eight directory frames and 64-character full paths; at most three -exec primaries are allowed. No -perm, -user or -group: ProDOS files have no permission bits, owner or group to test, so the primaries are refused (exit status 2) rather than invented.

October 8, 2026 maux