Linux Program background Run __linux

Source: Internet
Author: User

Method 1 in the terminal input command:

#./PSO > Pso.file 2>&1 &

Explanation: The PSO is run directly in the background and the terminal output is stored in the Pso.file file in the current directory.

When the client shuts down and then logs back to the server, the Pso.file file is viewed directly to see the execution result (life

Order: #cat Pso.file).

Method 2 in the Terminal input command:

# nohup/PSO > Pso.file 2>&1 &

Explanation: Nohup is not suspended meaning, will be the PSO directly in the background to run, and the terminal output stored in the current

Directory in the Pso.file file. After the client shuts down and logs back to the server, view the Pso.file directly

The file can look at the execution result (command: #cat pso.file).

iii. Common task management commands

# Jobs//view tasks, return task number N and process number

# BG%n//Turn the task numbered N to run in the background

# FG%n//Transfer the task number N to the foreground

# Ctrl+z//Suspend current task

# CTRL + C/End Current task

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.