Linux command --Shell application skills

Shell command interpreter, user and kernel interaction
bash
the Tab key to complete the command or file name
up and down keys to find the command history
clear = ctrl + l clear screen
ctrl + u Delete the character of the command line

Command aliases

Easy to remember
command name: alias
Function Description: Defines the alias
syntax: alias cp = Copy
Alias RM = "RM -rf"
unalias Copy delete an alias

Input / output redirection

Non-standard input and output
Shell process for each of three pre-defined file descriptors
0 standard input display
a standard keyboard output
2 stderr
output redirection
ls / tmp> /tmp.msg
emptied original document, the output to a file
ls / tmp >> /tmp.msg
results appended to the file
input redirection
wall </ etc / text
file text broadcasted
error output
command 2> error file
ls / tmp 2> ls.err

pipeline

The output of a command input to transmit another command, another command as
ls -l / etc | more

Command connector

; Command interval sequentially performed
&& Logical previously performed only after a successful execution, a failed after the first does not perform
|| logical OR, the first command execution fails before the second, the first successful second one does not perform

Alternatively command character

The output of a command as a parameter of another command
ls -l which touchoutput as a parameter which touch the ls -l

Guess you like

Origin blog.csdn.net/weixin_41998682/article/details/89738604