We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8b9389 commit 0775c0dCopy full SHA for 0775c0d
command/nohup.md
@@ -47,4 +47,16 @@ nohup wget site.com/file.zip
47
nohup ping -c 10 baidu.com
48
```
49
50
+### 最简单的后台运行
51
+nohup command &
52
+### 输出默认重定向到当前目录下 nohup.out 文件
53
+nohup python main.py &
54
+### 自定义输出文件(标准输出和错误输出合并到 main.log)
55
+nohup python main.py >> main.log 2>&1 &
56
+### 与上一个例子相同作用的简写方法
57
+nohup python main.py &> main.log &
58
+### 不记录输出信息
59
+nohup python main.py &> /dev/null &
60
+### 不记录输出信息并将程序的进程号写入 pidfile.txt 文件中,方便后续杀死进程
61
+nohup python main.py &> /dev/null & echo $! > pidfile.txt
62
0 commit comments