Run commands on the front-end and back-end of Centos

Source: Internet
Author: User
[Command] space [& amp;]: run the command in the background. for example, + & ldquo; & amp; & rdquo at the beginning. the specific method is as follows: [command] space [& amp;], for example: [root @ pcmxexwebetc] # find/-namexml & amp;, this lookup program runs in the background. It does not affect other tasks.

[Command] space [&]: run the command in the background;

For example, the method for adding "&" at the beginning is: [command] space [&]

For example: [root @ pcmxexweb etc] # find/-name xml &, this lookup program will run in the background. It does not affect other tasks.

But sometimes I forget to add the '&' symbol after the command, and I am not willing to stop the command and rewrite it again. You can press [ctrl + z] to switch the current program to the background.

However, note that the program in the background is in the Stopped state (check the last line above ).

Use jobs to view programs running in the background. [Root @ maxc] # jobs

[2] + Stopped vi/etc/hosts

You can use the command bg 1 to run the stopped command or task in the background.

Run the following command in the background: run the jobs command to check the number of the command or task to be called back to the foreground, that is, the number in the preceding []. then run the following command: the corresponding job number of fg, for example, fg 1. The corresponding program or command is called back to the front-end.

Related Article

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.