Boolean Predicates
Implicit AND — all predicates must match
# Files that are .adoc AND larger than 5K AND modified in last 7 days
find ~/atelier/_bibliotheca/domus-captures/docs -name "*.adoc" -size +5k -mtime -7 -type f
Explicit OR with parentheses — .adoc OR .yml
find ~/atelier/_bibliotheca/domus-captures/docs \
\( -name "*.adoc" -o -name "*.yml" \) -type f | head -20
NOT operator with ! — exclude index files
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages/codex \
-name "*.adoc" -type f ! -name "index.adoc"
Combined: time + size + path exclusion
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT \
-path '*/.git' -prune -o \
-type f -name "*.adoc" -size +2k -mtime -30 -print
OR with different types — find all dirs named "codex" OR files named "*.yml"
find ~/atelier/_bibliotheca/domus-captures/docs \
\( -type d -name "codex" \) -o \( -type f -name "*.yml" \)
Negate a compound expression — files that are NOT (empty OR symlinks)
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/partials \
-type f ! \( -empty -o -type l \) -name "*.adoc" | head -10
Depth-controlled search with multiple predicates
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/pages \
-mindepth 2 -maxdepth 4 -type f -name "index.adoc" | head -20
Complex: large files, excluding build artifacts, modified recently
find ~/atelier/_bibliotheca/domus-captures \
\( -path '*/node_modules' -o -path '*/.git' -o -path '*/build' \) -prune \
-o -type f -size +10k -mtime -14 -print | head -20
Count files matching each pattern with -exec
echo "=== .adoc files ==="
find ~/atelier/_bibliotheca/domus-captures/docs -name "*.adoc" -type f | wc -l
echo "=== .yml files ==="
find ~/atelier/_bibliotheca/domus-captures/docs -name "*.yml" -type f | wc -l
Find files matching pattern A but not pattern B
# All partials except those in the codex directory
find ~/atelier/_bibliotheca/domus-captures/docs/modules/ROOT/partials \
-name "*.adoc" -type f ! -path "*/codex/*" | head -20