π¦ ClawHub
Fd Find
by @arnarsson
A fast and user-friendly alternative to 'find' - simple syntax, smart defaults, respects gitignore.
TERMINAL
clawhub install fd-findπ About This Skill
name: fd-find description: A fast and user-friendly alternative to 'find' - simple syntax, smart defaults, respects gitignore. homepage: https://github.com/sharkdp/fd metadata: {"clawdbot":{"emoji":"π","requires":{"bins":["fd"]},"install":[{"id":"brew","kind":"brew","formula":"fd","bins":["fd"],"label":"Install fd (brew)"},{"id":"apt","kind":"apt","package":"fd-find","bins":["fd"],"label":"Install fd (apt)"}]}}
fd - Fast File Finder
User-friendly alternative to find with smart defaults.
Quick Start
Basic search
# Find files by name
fd patternFind in specific directory
fd pattern /path/to/dirCase-insensitive
fd -i pattern
Common patterns
# Find all Python files
fd -e pyFind multiple extensions
fd -e py -e js -e tsFind directories only
fd -t d patternFind files only
fd -t f patternFind symlinks
fd -t l
Advanced Usage
Filtering
# Exclude patterns
fd pattern -E "node_modules" -E "*.min.js"Include hidden files
fd -H patternInclude ignored files (.gitignore)
fd -I patternSearch all (hidden + ignored)
fd -H -I patternMaximum depth
fd pattern -d 3
Execution
# Execute command on results
fd -e jpg -x convert {} {.}.pngParallel execution
fd -e md -x wc -lUse with xargs
fd -e log -0 | xargs -0 rm
Regex patterns
# Full regex search
fd '^test.*\.js$'Match full path
fd --full-path 'src/.*/test'Glob pattern
fd -g "*.{js,ts}"
Time-based filtering
# Modified within last day
fd --changed-within 1dModified before specific date
fd --changed-before 2024-01-01Created recently
fd --changed-within 1h
Size filtering
# Files larger than 10MB
fd --size +10mFiles smaller than 1KB
fd --size -1kSpecific size range
fd --size +100k --size -10m
Output formatting
# Absolute paths
fd --absolute-pathList format (like ls -l)
fd --list-detailsNull separator (for xargs)
fd -0 patternColor always/never/auto
fd --color always pattern
Common Use Cases
Find and delete old files:
fd --changed-before 30d -t f -x rm {}
Find large files:
fd --size +100m --list-details
Copy all PDFs to directory:
fd -e pdf -x cp {} /target/dir/
Count lines in all Python files:
fd -e py -x wc -l | awk '{sum+=$1} END {print sum}'
Find broken symlinks:
fd -t l -x test -e {} \; -print
Search in specific time window:
fd --changed-within 2d --changed-before 1d
Integration with other tools
With ripgrep:
fd -e js | xargs rg "pattern"
With fzf (fuzzy finder):
vim $(fd -t f | fzf)
With bat (cat alternative):
fd -e md | xargs bat
Performance Tips
fd is typically much faster than find.gitignore by default (disable with -I)Tips
-t for type filtering (f=file, d=directory, l=symlink, x=executable)-e for extension is simpler than -g "*.ext"{} in -x commands represents the found path{.} strips the extension{/} gets basename, {//} gets directoryDocumentation
GitHub: https://github.com/sharkdp/fd
Man page: man fd
π‘ Examples
Basic search
# Find files by name
fd patternFind in specific directory
fd pattern /path/to/dirCase-insensitive
fd -i pattern
Common patterns
# Find all Python files
fd -e pyFind multiple extensions
fd -e py -e js -e tsFind directories only
fd -t d patternFind files only
fd -t f patternFind symlinks
fd -t l
π Tips & Best Practices
-t for type filtering (f=file, d=directory, l=symlink, x=executable)-e for extension is simpler than -g "*.ext"{} in -x commands represents the found path{.} strips the extension{/} gets basename, {//} gets directory