$ nohupls nohup: ignoring input and appending output to ‘nohup.out’ $ more nohup.out a anaconda-ks.cfg b file nohup.out # 输出结果自动追加到nohup.out $ nohupls nohup: ignoring input and appending output to ‘nohup.out’ $ more nohup.out a anaconda-ks.cfg b file nohup.out a anaconda-ks.cfg b file nohup.out # 标准错误会直接输出到终端 $ nohup aaa nohup: ignoring input and appending output to ‘nohup.out’ nohup: failed to run command ‘aaa’: No such file or directory # 可以指定所有输出到文件,注意&>表示覆盖,&>>表示追加 $ nohup aaa &> a.log $ more a.log nohup: ignoring input nohup: failed to run command ‘aaa’: No such file or directory $ nohup aaa &>> a.log $ more a.log nohup: ignoring input nohup: failed to run command ‘aaa’: No such file or directory nohup: ignoring input nohup: failed to run command ‘aaa’: No such file or directory