find the algorithm is as follows:
- For each path specified on the command line, let the current record be this way, and then:
- Match the current record with the expression.
- If the current entry is a directory, follow steps 1 and 2 for each entry in this directory in the unspecified order.
With -depthprimary, steps 1 and 2 are performed in reverse order.
, find, 2. find .
, find . -iname '.note' | sort . , , .
- find (, find ) .
find -type d -exec print-matching-files-in {} \;
find , find - , ( GNU):
find -type d -exec find {} -maxdepth 1 \! -type d … \;
:
find -type d -exec find {} -maxdepth 1 \! -type d -iname '.note' \;
zsh
print -l **/(
**/ ; (#i) (a ) , , (Od) (a glob qualifier) , . (Odon) , Od (.. ).