day1 learning tasks
[video] 1.Shell introduced
[video] 2. Command history
[video] 3. Command completion and aliases
[video] 4. wildcard
[video] 5. Input and output redirection
️12 point system will remind study punch
️ day test in the group announcement at around 8:00 in the evening, then pay attention to news group
history of the largest number of strip controlled by the variable $ HISTSIZE, all commands executed in .bash_history
history -c command history cleared
This parameter HISTSIZE / etc / profile can be configured in
HISTTIMEFORMAT="%Y/%m/%d %H:%M:%S "
chattr +a ~/.bash_history
!! executing a command
! N implementing Article the n-
! To perform a word beginning with the most recent word
Command Completion
bash-completion command packet completion
Define aliases
.bashrc
/etc/profile.d/
alias restartnet= systemctl restart network.service
unalias restartnet
Wildcard
* represents any one or more characters
? It represents a single character
ls [0-9] .txt representative of a range which
ls {1,2} .txt supra, but with different wording
Redirection
CAT 1.txt> 2.txt
CAT 1.txt >> 2.txt
CAT 1.txt 2> err.txt 2> represents an error output to a file
ls [12].txt aaa.txt &> a.txt
&> And correct errors are redirected to a file
ls [12] .txt aaa.txt> 1.txt 2> a.txt - different print an error to different files