nohup Command When using Unix/Linux, we usually want a program to run in the background, so we often use & at the end of the program to make the program run automatically. For example, we want to run mysql in the background: /usr/local/mysql/bin/mysqld_safe –user=mysql &. But many programs are not like mysqld, so we need the nohup command Process and job management The nohup command can run the program in a way that ignores the hang-up signal, and the output information of the program being run will not be displayed to the terminal. Regardless of whether you redirect the output of the nohup command to a terminal, the output is appended to the nohup.out file in the current directory. If the nohup.out file in 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, the command specified by the command parameter cannot be invoked. If standard error is a terminal, then all output of the specified command written to standard error is redirected to the same file descriptor as standard output. grammar nohup(option)(parameter) Options --help: online help; --version: Display version information. parameter Program and options: The program to run and the options. Examples one. Run the spring boot jar package. When the current terminal is closed, the Spring Boot project still runs in the background. two. Use the nohup command to submit a job. If you use the nohup command to submit a job, all output of the job is redirected to a file named nohup.out by default, unless an output file is specified otherwise: In the above example, the output is redirected to the file myout.file The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: vue-pdf realizes online file preview
This article example shares the specific code of ...
First download the latest MySQL 5.7.17 Community ...
Windows Server 2012 and Windows Server 2008 diffe...
This article describes the MySQL integrity constr...
Generally, learning Java and deploying projects a...
MySQL consistency log What happens to uncommitted...
Table of contents 1. Constraint concepts and clas...
Generally speaking, when we view the contents of ...
Table of contents 1. Check the status of the serv...
Using mask layers in web pages can prevent repeat...
The function has been implemented a long time ago...
1. Introduction to Logrotate tool Logrotate is a ...
background A specific device is used to perform i...
# Adjust VMware hard disk boot priority Step 1: E...
Table of contents Multiple conditional statements...