# Search file in root directory with name test.txtfind / -name "test.txt"# search all the files ending with txt extension and getting its long listingfind . -maxdepth 1 -name "*.txt" -exec ls -l {} \\;# all files in home directory with size > 1MBfind ~ -type f -size +1M
Options
Options
Description
-name
name of the file or directory to search
-mindepth
start searching after certain depth
-maxdepth
limit search to certain depth
-exec
execute a command for each file found
-perm
search for file with specific permission
-group
search files owned by specific group
-user
search files owned by specific user
-type
f for files, d for directories, l for symbolic links