FIND - locate files and directories

find ./ -name "layout.*"
find all files or directories named layout.[something], recursively under the current directory.

find /home -type f -name "*.inc"
find only files named [something].inc in or below the /home directory

find ~/ -amin -30 -type f
in or below user's home directory, find files accessed less than 30 minutes ago

find www/ -atime +3 -type f -name '*.css'
in or below www directory, find .css files accessed more than 3 days ago

find ./ -name "*.module" -exec grep -l "_form_alter" {} \;
in or below current directory, find all files or directoriesnamed [something].module and run grep on them, listing matches. (the matched file is substituted in place of the {})

more examples to come....

Find Me Around

User login