Under Linux, it is often necessary to find some files in a certain location. What to do? It's enough to use the Find command. Find Search-path Expressions Search-string
If you want to search the current directory. Then the search-path can be empty or a period '. '
If you look for files that were accessed 3 minutes before the current directory. Find. -amin 3
If you look for files that were accessed four days ago.
Find. -atime 4
If you look for a file with the file name changed 5 minutes ago. Find. -cmin 5
If you look for a file with a changed file name 6 days ago. Find. -ctime 6
If you look for a file that was modified 7 minutes ago. Find. -mmin 7
If you look for a file that was modified 8 days ago. Find. -mtime 8
If you look for a file with a file size of zero. Find. -empty
If you look for a file with index number 11331.
Find. -inode 11331
If you are looking for a file with the file name a.out. Find. -name a.out
If you want to find files with files named A.out and a.out.
Find. -iname a.out
Join to find a file with a permission value of 644. Find-perm 644
Join all files to query the current directory.
Find
Find-print
Another three options are more common.
-H does not follow symbolic links (but follows when processing command line arguments)
-L always follow symbolic connections
-P never follow a symbolic link (this is the default value)
Symbolic Links Symbolic Links
File type is L
Similar to the shortcut under Windows.
User default directory is ~
The current directory is.
The last directory was-
root directory is/
The previous level directory is:
- Related articles recommended:
- Linux Find command usage notes
- The find command clears the Linux system junk file for you
- Linux Find command-print0 and xargs-0 tips for using
- This article from: Hobby Linux Technology Network
- This article link: http://www.ahlinux.com/start/cmd/6870.html
Find a file Search command under Linux