First page Back Continue Last page Overview Graphics
find my xargs!
Extremely versitale command for finding files and doing stuff to/with them
find /path/to/directory -print
find -name '*.txt' -exec echo rm {} \;
- Note single quotes to avoid shell wildcard expansion
find -name '*.txt' | xargs echo rm
find -name '*.mp3' -print0 | xargs -0 mpg123
find -not -newer /tmp/basefile 2>/dev/null | xargs ls -l
For traversing the whole filesystem, consider “locate” instead but understand database requirements (updatedb, etc.)
Notes: