sudo nohup nice <-- in what order? sudo nohup nice <-- in what order? unix unix

sudo nohup nice <-- in what order?


If negative niceness is desired, I would do:sudo nohup nice commandbecause according to `info coreutils' nohup should preceed nice. If I want a negative nice value, sudo must come before, since only root is able to use negative nice values.

If positive niceness is desired, I would do simply:nohup nice sudo commandThis ensures that nohup and nice are not run with root privileges.


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

nice sudo nicesudo nice nice

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


~ $ sudo nohup nice whoaminohup: ignoring input and appending output to `nohup.out'~ $ sudo cat nohup.out root

The difference between the first and second way you've done it is who owns the nohup.out file. sudo first will make it owned by root, nohup before sudo will make it owned by your user.