Article Title: Task Management for linux Learning. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
&: Add an & symbol at the end of the command to indicate the background task, for example: wget http://www.download.net/xxx/mp3 & execute a song download in the background (here the wget program is used)
;: Use; when multiple commands are linked, the task is executed in order.
&: Use & to link Multiple commands, indicating that only the preceding commands are successfully executed and Subsequent commands can be executed.
": Command Line
' <命令> '. If a command contains a sub-command that is enclosed by a "(Press key below the Esc key), the sub-command is preferentially executed and the execution result is substituted into the upper-level command for further execution. For example
Create a file named after the current time:
Touch 'date + % m. % d _ % H: % M: % s'
The touch command can create a file whose operation object is the output 12.13_06: 06: 60 of the date + % m % d % H % M % S command, we created a file named 06.06_06: 06: 60 (just over 60 seconds at 06:06, January 1, December 13 -_-!); If we want to create a common file, such as touch bin. php, we will create a bin. php file.
Bg: run the background of the suspended task. The status is [1] + xxx &;
Fg: transfers the background task to the foreground for execution;
If you run multiple tasks in the background, you can use bg or fg followed by the task number as the operation object. For example, run the command bg 2 to view the task with ID 2 running in the background.
We talked about the ls-l command yesterday and used it to display the files and folders under the current directory. The output result contains seven columns,
To put the displayed content in a file, run the following command: ls-l> filename, then we put the output content in a file named filename under/home/username!
>: The reset direction symbol, which is used to reset the command output to a file. For example, if we want to save the ls result as a FileList file and make a list, we can use the reset direction symbol to complete it.
>>: The function is basically the same as>. The difference is that> writes the command output to the end of the file in append mode.
<: Indicates the reset direction from the file to the command. The file content is used as the command input.
Here we will briefly describe the escape characters (\)
According to my understanding, this is a bit like the escape in windows.
For example, the ";" mentioned above is to connect multiple commands, but sometimes we do not want this function, but we still need to use it; then we can: "\; this is not the meaning of connecting multiple commands for execution!
The Escape Character (\) can also be used as a line break in the Shell. Add an escape character at the end of a command, press enter, and continue to enter the remaining part of the command in the next line, splitting a command into multiple lines does not affect its execution. (If you execute a long command, split it into multiple lines for ease of reading.) In fact, line breaks also conform to the delimiter definition. The Enter key has two meanings: Enter and line feed (line arrow ). In Shell, it is executed as a control character. After the escape character is used, it indicates that the typographical character is wrapped in a line break.
Fish is a very friendly Shell, which is strongly recommended! Run sudo apt-get install fish to install it. After completion, run the command fish to switch to fish, and exit to return bash.
Run sudo apt-get install mplayer in the command line to install mplayer.