Linux common commands (Common Commands for Linux)
1. Statement, this article only write based on the Bash shell commonly used commands, if you encounter the command in the course of use, may be updated, the command has been replaced, please go to the official WIKI search or through the man manual to view.
2. Effectively combine command options and command parameters according to the actual situation:
command name [command arguments] [command object]
Note that the command name · Command Parameters · Between command objects, use the spacebar to separate them. Command objects generally refer to the target to be processed (normal file/directory file/user, etc.), command parameters can be used in long format or short format, respectively, "--" "-" to do the prefix, the command parameters will vary with the command and the environment.
3. Common commands are listed below:
A. Help command
Man---can be used to view specific available parameters and object formats
Help--View the assistance information
B. Directory Operations Command
LS--Display information about files and directories
CD-and switch directories
PWD--Displays the path to the current directory (absolute path shown)
---estimate file space usage or print capacity
mkdir-New Directory
RM---Delete files or directories
MV--Remove or rename a file or directory
CP---Copy files or directories, add parameter "-r" to the copy directory
diff--Compare the list of files in the catalog or the file contents are the same
Tree---Displays the current directory in a structure, if no command is required to install
C. text File Operations Command
Touch-To create an empty file, change the timestamp of the file
FILE-to-View files types
Stat--View file access time, modification time, change time
Cat--View Plain text file contents (show entire file contents at once), merge contents of multiple files into one file, content of merged file still exists
Head--View the top n rows of a file
Tail--View the following n rows of a file
More--View text files (longer, use SPACEBAR to move Down)
OD--to the file contents in a special way output (binary)
WC---statistics of the number of rows, words, bytes, etc. of the content in the file
TR--to replace compression and deletion of characters from standard input
echo---Displays a piece of text, or you can enter content into a file with a redirect
Cut-and-remove sections of each line in the file, extract the required characters in columns, and reference man for specific parameters
Linux common commands (common commands for Linux)