Common Linux file search commands
Whereis <program name>
Find the software installation path
-B: Only query binary files.
-M: Only search for help files
-S: only find the source code
-U: exclude files of the specified type.
-F only displays file names
-B <directory> Search for binary files in the specified directory
-M <directory> Find The Help file in the specified directory
-S <directory> Find the source code in the specified directory
Locate <File Name>
Search for files in the file index database
-D <database path> Search for a specified database
Updatedb
Update a file index database
Find [path] <expression>
Search for files
-Name <expression> searches for objects by file name
-INAME <expression> searches for files based on the file name, regardless of Case sensitivity.
-Path <expression> searches for files by path
-Ipath <expression> searches for files by path, case insensitive
-Amin <min> files accessed in the past n minutes
-Atime <days> files accessed in the past n days
-Cmin <min> files modified in the past n minutes
-Ctime <days> files modified in the past n days
-Anewer <reference File>: a file that has been read later than the reference file
-Cnewer <reference File>: a file that has been modified later than the reference file
-Size <size> searches for files based on the file size, in the unit of B C W K m g
-Type <file type> searches for files based on the file type. Block B Device C character device d directory P pipeline file F Common file l link S port File
-User <User Name> searches for files by owner user
-UID <uid> Search for files by uid
-Group <Group Name> Search for files by group
-Gid <GID> Search for files by GID
-Empty
Grep <string> | "<Regular Expression>" [file name]
Search for content in the file
--- By yuzhang2