当前位置:网站首页>Test the respective roles of nohup and &
Test the respective roles of nohup and &
2022-06-27 02:25:00 【Production team o_ O's donkey】
Start the front desk service , The log will be printed and cannot be entered in the current window
Suppose the command entered is : XXXXX
Input nohup XXXXX & Command is enough .
To find out nohup and & Their respective functions , I did the following 4 Test and record the results :
| XXXXX | The foreground prints log information | Close the current window , Service stopped | ctrl+c After the operation , Service stopped | The process number of the service is not displayed |
| nohup XXXXX | The front desk does not print log information | Close the current window , The service doesn't stop | ctrl+c After the operation , Service stopped | The process number of the service is not displayed |
| XXXXX & | The foreground prints log information | Close the current window , Service stopped | ctrl+c After the operation , The service doesn't stop | Display the process number of the service |
| nohup XXXXX & | The front desk does not print log information | Close the current window , The service doesn't stop | ctrl+c After the operation , The service doesn't stop | The process number of the service is not displayed |
Conclusion :
nuhup Ensure that log information is not displayed in the foreground , And the service does not stop when the current window is closed ;
& Guarantee ctrl+c The operation service does not stop , Display the process number of the service
They are independent of each other , Guarantee of cooperative use :
1. Do not display log information
2. Close the current window , The service doesn't stop
3.ctrl+c After the operation , The service doesn't stop
4. Display the process number of the service
notes :nohup Make the log information not displayed , And stored in the current input path nohup.out In file .
边栏推荐
- Uninstallation of Dameng database
- Hot discussion: what are you doing for a meaningless job with a monthly salary of 18000?
- 学习太极创客 — MQTT 第二章(二)ESP8266 QoS 应用
- Oracle/PLSQL: Substr Function
- 【微服务|Sentinel】降级规则|慢调用比例|异常比例|异常数
- Oracle/PLSQL: Lower Function
- Oracle/PLSQL: Cast Function
- Sword finger offer 𞓜: stack and queue (simple)
- C # check whether the date is in the correct format
- Paddlepaddle 20 implementation and use of exponentialmovingaverage (EMA) (support static graph and dynamic graph)
猜你喜欢

What if asreml-r does not converge in operation?

I earned 3W yuan a month from my sideline: the industry you despise really makes money!

消费者追捧iPhone,在于它的性价比超越国产手机

Learn Tai Chi Maker - mqtt Chapter 2 (3) reserved messages

Flink Learning 2: Application Scenarios

Installing the Damon database using the command line

H5 liquid animation JS special effect code

Flink learning 1: Introduction

Flink学习3:数据处理模式(流批处理)

TechSmith Camtasia最新2022版详细功能讲解下载
随机推荐
Hot discussion: what are you doing for a meaningless job with a monthly salary of 18000?
正则表达式:语法
dat. gui. JS star circle track animation JS special effect
Oracle/PLSQL: HexToRaw Function
Oracle/PLSQL: Trim Function
h5液体动画js特效代码
Constraintlayout Development Guide
docker部署redis集群
Sample development of WiFi IOT Hongmeng development kit
Memcached basics 14
Leetcode 785: judgment bipartite graph
pytorch 23 hook的使用与介绍 及基于hook实现即插即用的DropBlock
H5 liquid animation JS special effect code
Flink learning 3: data processing mode (stream batch)
达梦数据库的卸载
Oracle/PLSQL: Rpad Function
Oracle/PLSQL: Cast Function
Installing the Damon database using the command line
The use and introduction of pytorch 23 hook and the implementation of plug and play dropblock based on hook
[array] sword finger offer II 012 The sum of left and right subarrays is equal | sword finger offer II 013 Sum of two dimensional submatrix