sudo nohup nice <— in what order?

后端 未结 6 1545
南旧
南旧 2021-02-12 13:51

So I have a script that I want to run as root, without hangup and nicely. What order should I put the commands in?

sudo nohup nice foo.bash &

or

noh

6条回答
  •  -上瘾入骨i
    2021-02-12 14:01

    sudo may not respect niceness. At least, it doesn't on my machine (Ubuntu 9.04). Running this:

    nice sudo nice
    sudo nice nice
    

    prints out 0 and 10. (Note that 'nice' with no command prints out the current niceness.)

提交回复
热议问题