View your current directory
Pwd
Create file: 1-1.txt
Touch 1-1.txt
Go to the ETC directory under the statistics directory
Cd/etc
Forcibly terminates the current program
Ctrl + C
Common shortcut keys
Keys |
Role |
Ctrl+d |
Keyboard input end or exit terminal |
Ctrl+s |
Pause the current program, pause and press any key to resume running |
CTRL + Z |
Put the current program in the background to run, restore to the foreground for command FG |
CTRL + A |
Move the cursor to the input outfit, which is equivalent to the home key |
Ctrl+e |
Moves the cursor to the end of the input line, equivalent to the END key |
Ctrl+k |
Remove from cursor position to end of line |
Alt+backspace |
Delete a word forward |
Shift+pgup |
Scroll the terminal display up |
Shift+pgdn |
Scroll down the terminal display |
using the History Input command, use the direction key on the keyboard ↑ to restore the commands you have entered previously
direction on key ↑
A wildcard is a special statement that has an asterisk (*) and a question mark (?) to make a fuzzy match to a string (such as a file name, parameter name). When you look for a folder, you can use it instead of one or more real characters, and you often use wildcards instead of one or more real characters when you don't know the real characters or are too lazy to enter the full name.
Batch Create multiple Files
Touch Love_{1..10}_linux.txt
List all files with the suffix txt
LS *.txt
Shell Common wildcard characters:
Character |
Meaning |
* |
Match 0 or more characters |
? |
Match any one character |
[List] |
Match any single character in the list |
[!list] |
Matches a character other than any single character in the list |
[C1-C2] |
Match any single word in c1-c2 such as: [0-9] [A-z] |
{String1,string2,...} |
Match string1 or string2 (or more) one string |
{C1.. C2} |
Match all characters in c1-c2 such as {1..10} |
Interesting Linux printing, first execute the following two sentences:
$ sudo apt-get update
$ sudo apt-get install Sysvbanner
Execute this sentence to print Linux
Banner Linux
Printerbanner-w b
One of the Linux Lab building studies