Dba_ Command Nohup Use a script that takes too long to perform into the background (case) (a long script background run prevents the session from being broken)

Source: Internet
Author: User

2014-08-08 Baoxinjian

I. Summary

The nohup command runs commands specified by the command parameter and any related arg parameters, ignoring all hang-up (SIGHUP) signals.

Use the Nohup command to run a program in the background after logging off.

To run the Nohup command in the background, add & (the symbol representing "and") to the end of the command.

1. REDIRECT Log files

If the output of the Nohup command is not redirected, the output is appended to the Nohup.out file in the current directory. If the nohup.out file for the current directory is not writable, the output is redirected to the $HOME/nohup.out file. If no file can be created or opened for appending, then the command specified by the commands parameter is not callable. If the standard error is a terminal, then all output of the specified command to the standard error is redirected to the same file descriptor as the standard output.

2. Key Concepts

(1). Function: Causes the process to continue execution after exiting the login.

(2). Format: $ nohup < program name > &

(3) Results: If the program has the result output, the output will be saved to a file named Nohup.out in the current directory, if the user does not have write permission in the current directory, the results will be saved to the user's home directory in the Nohup.out file.

(4). View: Jobs

Second, case-use Nohup startup script, background to view the situation

Abalone New ********************

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.