linux nohup

使用&可以使得程序在后台运行,但是当当前终端关闭的时候,程序也会停止;
此时可以使用nohup命令,
比如

假设运行的脚本是test.sh
nohup sh ./test.sh  > /dev/null 2>&1 & 
posted @ 2018-10-30 20:22  岳麓丹枫  阅读(97)  评论(0编辑  收藏  举报