1. search for executable files which displays the complete path of an executable file according to alias & mdash; & gt; $ PATH sequential search View system environment variable whereis search an executable tool and its related configuration, help slocateslocate or locate all files
1. search for executable files
Which
Display the complete path of an executable file
Search by alias-> $ PATH
View system environment variables
Whereis
Search for an executable tool and its related configurations and help
Slocate
Slocate or locate keywords
All files and directories whose names and paths contain 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 in a specified path
Supports searching by various criteria
Allows you to use commands to search for files.
Search by file type
2. operate on the files found
Syntax: find [path] [parameter] [expression]-exec command {}\;
{} Indicates the file found by find.
\ Prohibit conversion
; Indicates the end of the command.
III. common file Operation Commands
Wc
Grep displays the rows in the file that match the keyword.
Sort sorts text in order and sends it to display
Diff report text differences
Location of comp report text difference
Uniq removes duplicate rows from the file
Show a column in the file
Paste concatenates text by column