Summary of commands: 100
mkdir command to create a directory mkdir directory
Ls-l (long) d (directory) displays the directory or file name list
CD switch directory hierarchy change directory
echo Print out content (printf)
Vi/vim Notepad Editor Command mode (: wq:q: q! : wq!) <===> insert mode (ESC Toggle Command mode)
W Write Q Quit! Forced
Cat View File Contents
CP-APR Copy files or directories
MV Move directory or rename (rename command)
RM Delete file or directory-F Force Delete file-R recursively delete-FR delete specified directories and files
RmDir Delete empty directory, chicken command
Head Header Display file header-N rows-number of rows default display first 10 rows
Tail tail display file trailing-n lines-line number default display trailing 10 lines
grep* (filtering) One of the core commands (old three of the Musketeers) excludes-V "Exclude" direct filter "desired" –E filter multiple Strings –I filter is case insensitive
Egrep equivalent to-E
Sed* take all kinds of content (the third Swordsman's Dick)-N cancels the default output P=print D=delete
Alias display aliases
Unalias Canceling aliases
Which view path Whereis,locate,find
find* view command-type (f D)-name "ddd" Search by name-mtime by the modified time
Tree view directory Structure
Xargs is used to give the output of the find/ls to the back processing
SEQ Print number sequence echo{1..5}
Man view commands and configuration file Help
Touch to create a file or modify the timestamp of a file
PWD Displays the current path
Vimdiff File Comparison Tool
WHOAMI viewing the current command line end user
Su Switch User role, note to take-
Historical View history-C (Clear All)-D (Specify line number Delete)
Chkconfig View the command to set the boot-up software
Netstat Viewing network status
Symbol:
; multiple command separators
/root or path delimiter
> Standard output redirection (data flow in the direction of the arrow), overwriting the original file
>> Follow-up orientation (data flow in the direction of arrows), append content at the end of the original file content
< or < standard input redirection: Input redirection courage to change the input of the command, specify the input, followed by the file name
<< or << input redirection: followed by a string to indicate "input end" or ctrl+d to end the input
.. Top level Directory
. Current directory
| The pipeline passes the output of the previous command to the next command to continue execution
{} with echo print sequence echo {1..6}
The number separates different commands.
/indicates the delimiter of the root or path
The VI editor shortcuts
99gg line number plus GG, quick to reach 99 lines
YY Copy a whole line
P Paste
: Set NU Displays line number
Shortcut keys:
!=101 represents a 101-line command in the execution history
!! Execute the most recent command
! C Execute the most recent command starting with C
This article from the "11686974" blog, reproduced please contact the author!
Linux basic commands and shortcuts (unfinished version)