Linux 7th Day
Time: 20180723
Bash features
Curly braces unfold
{001..20..2}
Command completion
Tag option completion (CENT7 support Bash-complement)
Command line History
Histroy ~/bash_history
!! Repeat the previous command
!-1 repeat the previous command
Ctrl+p Print the previous command on the current command line
!? String executes the last command containing string
!$:p Output The last parameter of the last command line
!*:p Output All parameters of the last command
^string deletes a string from the previous command and executes
Ctrl+r Search History Command ctrl+g exit Search History command
Esc. Print the last parameter of the previous command
History
-C Clears all command history in memory
-A synchronizes the history of the command in memory to the file
-D Delete Specifies a command history
-R synchronizes commands in the history file into memory (reads repeatedly)
-N synchronizes commands in the history file into memory (no repeated reads)
-P executes a command without buffering it into the command history
-S does not execute a command, just caches it in the command history cache
Bash's shortcut keys
CTRL + Z Hang command
CTRL + C terminate command
Ctrl+s Block Screen
Ctrl+q Allow screen output
Echo '---' >/sys/class/scsi_host/host2/scan triggers the VMware Discovery Drive and is only used in VMware
Linux File System architecture
FSH Filesystem Hierarchy Standard
Creating special Files
-hosts create such a file
Touch/data/-hosts
Linux 7th Day