Instructions for using task management in Linux systems

Source: Internet
Author: User
Keywords Linux
Tags .net download example file http link linux linux systems

&
Add a & symbol at the end of the command to indicate the background task, for example:

wget Http://www.download.net/xxx/mp3 &

;
Use; Connecting multiple commands means that the tasks are executed sequentially

&&
Connecting multiple commands with && means that only the previous command succeeds and the following command is executed

``
' < command > ', if a command contains a subcommand that is enclosed with the key below the ESC key, then the subcommand will be executed first, and the execution result is to be replaced by the previous command, such as creating a file named after the current time:

Touch ' Date +%m.%d_%h:%m:%s '

The touch command can create a file, its action object, the output of the date +%m%d%h%m%s command 06.06_06:06:60

In this way, we created a file named 06.06_06:06:60 (June 6 6:6 just over 60 seconds-_-!)

Ctrl
Suspend a task in the current shell

This time the status of the task is

[1]+ Stopped XXX

Bg
Runs the pending task background. At this point its state is

[1]+ XXX &

Fg
Transfer background tasks to foreground execution

Jobs
The number in square brackets is the task number for the command, and you can use the Jobs command to view all background tasks

If you run multiple tasks in the background, you can use the BG or FG followed by the task number as the action object, for example:

BG 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.