Find a directory with name Conf
#find/directory-type d-name conf
Note that the type may be b,c,d,l ...
Find files with permissions of 755
#find/directory-perm 755-print
If you use octal, you can use the
#find/directory-perm-007-print (same as in chmod)
Find files that belong to kt
#find/directory-user Kt-print
Find a file with a group of KT
#find/directory-group Kt-print
Find a file with the name file
#find/directory-name file
Find a file size 0
#find/directory-size 0
Ignore a directory:
#find/directory-name "/directory Name"-prune-o-print
Find files that have been deleted by the master account:
#find/Directory-nouser-print
Find files by change time
#find/directory-mtime-5-print Unit is 5, find files that have changed within 5th
Find files within 3rd of the change time
#find/directory-mtime +3-print
Find changes longer than file1 new but older files than file2
#find/directory File1! -newer file2-exec ls-l {} \;
Not only querying the root directory, but querying subdirectories
#find/directory-name File-depth-print
Query only within the current file system and not into other file systems
#find/directory-name File-mount-print
Operation of the found file with exec
The operation "Ls-l" is performed #find/directory-type f-exec ls-l {} \//-exec ls-l {} \;
In exec Safe mode, prompt before deletion
#find/directory-name "*.log"-mtime +5-ok rm {} \//So prompts before deleting files
To obtain a hard link based on the inode number
#find/directory-inum inode number
The files found by find can be executed using the-exec execute instruction {} \, or you can use the | Xargs instructions.