我有一些关于 nohup 的问题。下面显示了我尝试过的命令和结果。如果我必须使用nohup ... &然后disown,那么有什么用nohup?我可以简单地使用... &然后disown。
运行命令,nohup然后 ctr+c ,命令没有继续
$ nohup somecommand -option inputfile > outputfile
nohup: ignoring input and appending output to `nohup.out'
^C
运行命令,nohup ... &然后 ctr+c,命令继续,但退出后停止
$ nohup somecommand -option inputfile > outputfile &
nohup: ignoring input and appending output to `nohup.out'
^C
$ exit
nohup ... &使用然后 ctr+c运行命令,即使退出后命令也会继续
$ nohup somecommand -option inputfile > outputfile &
nohup: ignoring input and appending output to `nohup.out'
^C
$ disown
$ exit
使用 withoutnohup然后 ctr+c 运行命令,即使退出后命令也会继续
$ somecommand -option inputfile > outputfile &
nohup: ignoring input and appending output to `nohup.out'
^C
$ disown
$ exit