linux nohup的使用

lys2020年04月24日 0条评论

linux nohup的使用

nohup python3 test.py >/dev/null 2>&1 &

在上面的例子中,0 – stdin (standard input),1 – stdout (standard output),2 – stderr (standard error) ;

2>&1是将标准错误(2)重定向到标准输出(&1),标准输出(&1)再被重定向输入到myout.file文件中,我们这边是/dev/null就是丢弃的意思