Command name: Find
Features: File Search
Command path:/bin/find
Usage: Find search scope match criteria
Other:
Example:
Find/root-name Init
Find/root-size +1024
Find/root-user Dashen
Find/root-group Yizu
Find/root-cmin-5
Find/root-size +1024-a-size-2048
Find/root-type F
Find/root-inum 1234
Find/root-name test-exec ls-l {}\;
Parameters:
-name Search by file name (exact search.) To use a fuzzy search, you can use a wildcard character: * Match 0 or more characters, match a single character)
-iname Search by file name, case insensitive
-size is found by file size (+n is greater than, n is less than, N equals.) Units are data blocks, 1 data blocks are 512 bytes, 0.5K. Data block is the smallest unit of Linux storage files)
-user Find by file owner
-group find by file-owning group
-amin find files accessed in n minutes (+n over how long,-N how long)
-cmin find files that have been modified in n minutes (+n over how long,-N, how long)
-mmin find files that have been modified in n minutes (+n over how long,-N, how long)
-A connection option, and
-O connection option, or
-type Search by file type (f file, D directory, l soft link file)
-inum based on I-node lookup
-exec command {}\; (Perform actions directly on search results.) {} indicates a substitution for search results, \ is an escape character)
-ok and-exec are similar, just need to ask
Command name: Locate
Function: Find files in the file repository
Command path:/usr/bin/locate
Usage: Locate [-I.] File name
Other: File repositories are automatically maintained on a regular basis, not in real time, and some directory files are not included. You can use UpdateDB to update the file repository.
Parameters:
-I is case insensitive
Command name: which
Function: Search the directory and alias Information of the command (only can search the command)
Command path:/usr/bin/which
Usage: which command
Command name: Whereis
Function: Search the directory where the command is located and the Help document path
Command path:/usr/bin/whereis
Usage: Whereis command
Command name: grep
Function: Search for string matching lines in the file and output
Command path:/bin/grep
Usage: grep [-iv] Specifies a string file
Parameters:
-I is case insensitive
-V excludes the specified string
Linux notes: Search command Find,locate,which,whereis,grep