gpt4 book ai didi

linux - 后台作业job id后面的后缀 "+"和 "-"是什么意思?

转载 作者:IT王子 更新时间:2023-10-28 23:58:14 24 4
gpt4 key购买 nike

当我运行多个后台进程时,我的命令 jobs 的输出例如是:

[1]-  RUNNING                  nohup somecommand1 &
[2]+ RUNNING nohup somecommand2 &

job id 后面的“+”和“-”字符是什么意思?

最佳答案

它位于 STDOUT 下作业的手册页中:

> man jobs

The character '+' identifies the job that would be used as a default for the fg or bg utilities; this job can also be specified using the job_id %+ or "%%" . The character '-' identifies the job that would become the default if the current default job were to exit; this job can also be specified using the job_id %-.

所以标有'+'的工作就是将被'fg'激活的工作。

关于linux - 后台作业job id后面的后缀 "+"和 "-"是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9564545/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com