jobs
喵喵 发表于 2020-07-10 09:54浏览次数:
在类似Unix的操作系统上,作业shell命令列出所有正在运行的作业的状态。
本文档涵盖了作业的bash内置版本。
On Unix-like operating systems, the jobs shell command lists the status of all running jobs.
This document covers the bash built-in version of jobs.
目录:
1 jobs 运行系统环境
2 jobs 语法
3 jobs 选择
4 jobs 示例
jobs 运行系统环境
jobs 语法
jobs [-lnprs] [JOBSPEC ...]
jobs [-lnprs] [JOBSPEC ...]
jobs 选择
JOBSPEC
|
Job 名称或编号。
|
-l
|
除了普通信息之外,还列出进程ID。
|
-n
|
仅列出自上次通知以来已更改状态的进程。
|
-p
|
仅列出进程ID。
|
-r
|
将输出限制为运行作业。
|
-s
|
将输出限制在已停止的作业上。
|
JOBSPEC
|
Job name or number.
|
-l
|
Lists process IDs in addition to the normal information.
|
-n
|
List only processes that have changed status since the last notification.
|
-p
|
Lists process IDs only.
|
-r
|
Restrict output to running jobs.
|
-s
|
Restrict output to stopped jobs.
|
jobs 示例
jobs
显示所有正在运行的作业。输出类似于以下内容:
[1] + Stopped (user) top
在这里,作业1已被用户暂停,在本例中的过程是顶级实用程序。
jobs -l
当提供-l选项时,jobs除了显示作业编号外,还会显示进程ID,类似于以下输出:
[3] 16882 Running ./chsearchproc (wd: ~/public_html/cgi-bin/chsearch)
jobs
Displays all running jobs. Output is similar to the following:
[1] + Stopped (user) top
Here, the job number 1 has been suspended by the user, and the process in this case is the top utility.
jobs -l
When supplied the
-l option,
jobs displays process IDs in addition to job number, similar to the following output:
[3] 16882 Running ./chsearchproc (wd: ~/public_html/cgi-bin/chsearch)