Article Index

This is all you need.

find . -name "foo*"

find needs a starting point, and the . (dot) points to the current directory.

Condition flow

\! -name "*.c"
\( x -or y \)

Actions

-exec rm {} \;
-print
-delete

Examples

find . -name '*.jpg'
find . -name '*.jpg' -exec rm {} \;
find . -newerBt "24 hours ago"

 

 

Part I – Basic Find Commands for Names