find : search for files in a directory hierarchy
[SYNOPSIS] find PATH OPTION
OPTION
-name FILENAME search by file/directory name
# find ./ -name file.txt
search for [file.txt] in the current directory
-perm PERMISSION search by permission
# find ./ -perm -o+x
search for files in the current directory that have execution permissions set to other
-size SIZE search by file size (add [c] after size to specify number of bytes)
# find ./ -size 1140c
search for a file in the current directory that is 1140 bytes long
-type TYPE search by file type
# find ./ -type d
search for a directory in the current directory
-user USER search by user
# find ./ -user root
search for files in the current directory whose owner is root
-group GROUP search by group
# find ./ -group root
search for files in the current directory whose owner is group root
-exec COMMAND {} \; if files or directories matche, execute the specified command
# find ./ -size 1140c -exec cat {} \;
If there is a file of 1140 bytes in the current directory, execute the cat command
-print display search results as a list
-fprint FILE write search results to a specified file
-ls display details of files/directories that match the search
-nouser search for files/directories with unknown owner
-nogroup dind files/directories with unknown owner group
-and AND Search
-or OR Search
-atime DATE search by last access date and time of file/directory
-mtime DATE search by last update date of file/directory
-ctime DATE search by file/directory status change date/time
-newer FILE search for files/directories that have been updated more recently than the specified file/directory
-links NUM search by number of links to files/directories