File search and file management of Linux/unix command
Search for executable files
which
Displays the complete path to an executable file
Find them in the order alias->$PATH
View the system's environment variables
whereis
Search for an executable tool and its associated configuration, help
slocate
locate or locate keywords
All files and directories with file names and paths containing key fields are displayed
slocate first makes the current directory structure into a database, and then searches for matching records in this database
find
find [path] [parameter] [expression]
Recursively searches for files from a specified path down
Support search by various criteria
Support for further command manipulation of files obtained by searching
Search by file type
II. Operation of found files
Syntax: find [path] [parameter] [expression] -exec directive {} \ ;
{} represents the file found
\No diversion
; indicates the end of this line of command
III. Common file operation instructions
wc counts lines, words and words of text
grep displays lines in a file that match keywords
sort sorts text in order and sends it to display
diff Report Text Difference Content
comp Report Text Difference Location
uniq removes duplicate lines from files
cut displays a column in a file
paste Splices text into columns