The
find ./ -name "filename.*"
OR
find ./ -iname "fIlEnAmE.*"
These will search for files with the name “filename.*”. The difference is ‘iname’ is case insensitive while ‘name’ is case sensitive.
find ./ -mtime +30
This will search for files that have been modified 30 days before today
find ./ -user apache
OR
find ./ -group apache
Find files owned by the user or group ‘apache’
find ./ -type f
OR
find ./ -type d
Type “f” = files, type “d” = directories
find ./ -newermt "Feb 24"
OR
find ./ -newermt "Feb 24" ! -newermt "Feb 28"
OR
find ./ -type f -newermt "2018-02-24 00:00:00" ! -newermt "2018-02-28 00:00:00"
Find files modified after Feb 24, OR after Feb 24, but before Feb 28
find ./ -type f -exec chmod 775 {} \;
OR
find ./ -type d -name "cache" -exec rm -rf {} \;
The “-exec” flag executes shell commands on each of the files found. The first example will look for all files in this folder (and all sub-folders) and