Linux commands 150 commonly used is also 80.
Linux command operation syntax format diagram:
Command _ parameter _ path file
Rm-f/tmp/t.log
Tips:
A. Parameters of the command are optional
B. Different command paths and files are optional
Simple Help for Command--help command
Help for man = = Command
Help for command (bash built-in commands)
LS ==list view directory list
mkdir ==make Directory role is to create a directory, for example: Mkdir/data
CD ==change directory role is to switch paths, for example: CD/
Touch = = Touch to create a file, for example: Touch oldboy.txt
VI = = Editor, equivalent to a notebook, has the editing function, but weak.
Vim = = Complex Editor, equivalent to, emeditor,editplus,notepad+
echo = = Print out content, with "> or >>" to overwrite and append content to the file
echo "Oldboy oldgirl" >oldboy.txt
Cat = = View File contents
Special usage: Add multiple lines of content
Cat >>/data/oldboy.txt<<eof
I am studing Linux.
Eof
EOF is to appear in pairs, and EOF can be replaced by arbitrary pairs of content.
CP ==copy Copy Command CTRL + C, e.g. CP oldboy.txt/tmp/
-R: Recursive for copying directories;-P: Hold Properties
-A: equivalent to-PDR
MV = = Move directory or file, for example: mv/data/root/
PWD ==print Work Directory View the path of the current user
Shortcut keys:
TAB = = Command, path completion
Special character Commands:
> or 1> redirects will erase all previous data in the file and add new data.
>> or 1>>, the end of the file to add content, will not delete the existing file content.
< input redirection
<< Chase input Redirection
2> Error Redirection
2>> Error Append redirect
1. Standard input (stdin): code 0, use < or << data flow from right to left.
2. Normal output (STDOUT): Code 1, use > or >> Data flow from left to right.
3. Error output (stderr): Code 2, use 2> or 2>>.
The direction of the arrows is the flow of data
Linux Command Summary