Does anyone know if it's possible to execute and renice a process in one command, i.e. without having to look up the command in the list of processes using the ps command and then renice that particular pid.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
As I mentioned, @glenn-jackman gave you the answer. But just to elaborate a bit more, if you wish to give higher priority to the command but do not intend to run it as root, you could use a function (and sudo):
Then execute it as (this could ask for your user password, depending on how is sudo configured)
And from a top on another terminal, you can double check the nice value. |
|||||||||
|
|
Just use
This will run |
|||
|
|
nicewhen you launch the process, instead ofreniceafterwards? – glenn jackman Sep 8 '11 at 2:32