Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想改进我刚刚停止使用 Control-Z 而不查看topor的输出的过程ps。我知道你可以恢复一个流程,或者准确地说是 Bash 的工作,bg 1例如。但是你能做这样的事情renice吗?
top
ps
bg 1
renice
您可以通过将其 jobspec 提供给jobsbuiltin 来获取已停止作业的 PID,并将其用作renice. 例如:
jobs
$ sleep 10 ^Z [1]+ Stopped sleep 10 $ renice -20 $(jobs -p %1) 26939 (process ID) old priority -11, new priority -20 $