Linux-- several important hotkeys [Tab], [ctrl] -c, [ctrl] -d

[Tab] button (command completion and alert)

[Tab] key on the keyboard is capitalized lamp switch button ([Caps Lock]) the button above! In various Unix-Like the Shell among the [Tab] key be Linux 's Bash shell One of the best features of! He has a "command completion" and "padded file" function Oh! The point is that we can avoid the wrong command or file name it! Great bar! But the [Tab] key input in different places will have different results Oh! We cite the following example to illustrate.

[dmtsai@study ~]$ ca[tab][tab]     <==[tab]按键是紧接在 a 字母后面! 
cacertdir_rehash     cairo-sphinx cancel     case 
cache_check          cal                     cancel.cups 
cat                  cache_dump              calibrate_ppa
capsh                catchsegv               cache_metadata_size 
caller               captoinfo               catman

# 上面的 [tab] 指的是『按下那个 tab 键』,不是要你输入中括号内的 tab 啦!

All at ca instructions are displayed at the beginning of it! Very good bar! So, if you type " ls -al ~ / .bash two" plus [tab] what will appear?

[dmtsai@study ~]$ ls -al ~/.bash[tab][tab]

.bash_history .bash_logout .bash_profile .bashrc

what! In this directory all to .bash   for the beginning of the file name will be displayed out of it! Note the two examples above Oh, I have press [tab] button if it is in place (command first input data ) back when he represents the "command completion", as if is connected to the second after words, it will become "filled file" function up! But under some special instructions, documents filled function may become "parameters / options padded" Oh! We also use the date  this command to check:

[dmtsai@study ~]$ date --[tab][tab]	<==[tab]按键是紧接在 -- 后面!
--date	--help	--reference=	--rfc-3339=	--universal
--date=	--iso-8601	--rfc-2822	--set=	--version
# 瞧!系统会列出来 date 这个指令可以使用的选项有哪些喔~包括未来会用到的 --date 等项目

in conclusion:

  • [Tab]   connected to the back of the first word of a string of instructions, for the "command completion";
  • [Tab]   then after the second word in the string of instructions, for the "file filled"!
  • If you install bash-completion  software, use the instructions in the back of some [tab]  When the button, you can "Options / padded parameters" feature!

Note: CentOS 7.x which, due to the more software called bash_completion, the software will take the initiative to detect such acts "options and parameters of each instruction can be issued", therefore, that "filled file" function You may become "options, parameters, padded" function, not necessarily the name of the file will automatically padded Oh! This point must pay special attention.

[Ctrl] -c button (interrupt execution of the output)

If you are in Linux you entered the wrong instructions or parameters beneath, sometimes the command or program will "run non-stop" in this system under a time how to do? Do not worry, if you want the current program "stopped", you can enter: [Ctrl] and c button ( before pressing [Ctrl] and hold, and then press the c button, is a combination of buttons ) , it is interrupted currently the program button it! For example, if you enter " when the find /" this command, the system will start to run something ( Do not ignore this command string meaning ) , then you give him press [Ctrl] -c set the press and, hey ! Whether immediately found the command string is terminated! Such is the meaning of it!

[dmtsai@study ~]$ find /

....(一堆东西都省略)....

# 此时屏幕会很花,你看不到命令提示字符的!直接按下[ctrl]-c 即可!

[dmtsai@study ~]$ <==此时提示字符就会回来了!find 程序就被中断!

Note: This key combination can be operational in the instruction interrupted, if you are operating more important instructions, may not rush to use this key combination.

[Ctrl] -d key (keyboard input end) 

This key combination usually represent: " keyboard input end (End Of File, EOF  or End Of Input) " means! In addition, he may also be used to replace exit enter it! For example, you want to immediately leave the text interface, you can simply press [Ctrl] -d will be able to directly leave ( equivalent input exit ah! ) .

[Shift] + {[PageUP] | [Page Down]} button (text page) 

If you execute certain instructions in plain text in the screen, the output of the command message is quite long ah! Resulting in the front part is no longer in the current screen screen, so you want to take a look back output message, then what can we do? In fact, you can use [Shift] + [Page Up] to move forward flip, also can use [Shift] + [Page Down]   after contact page! The two key combinations can also remember a little bit, when you turn the screen slightly forward, very helpful!

Published 705 original articles · won praise 666 · Views 1.43 million +

Guess you like

Origin blog.csdn.net/qq_36761831/article/details/104779055