← 返回命令列表

Linux command

jobs 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

jobs

Example

jobs -l

Example

jobs -n

Example

jobs -p

Example

jobs -r

Example

jobs -s

说明

jobs is a shell builtin that displays the status of jobs started in the current shell session. Jobs are processes started with & (background) or suspended with Ctrl+Z. Each job has a job number (shown in brackets) that can be used with fg, bg, and kill commands using the %n syntax. The + indicates the current job, and - indicates the previous job.

参数

-l
List process IDs in addition to normal information
-n
Display only jobs with status changed since last notification
-p
Display only process IDs
-r
Display only running jobs
-s
Display only stopped jobs
-x _command_
Replace jobspec in command with process group ID and execute it

FAQ

What is the jobs command used for?

jobs is a shell builtin that displays the status of jobs started in the current shell session. Jobs are processes started with & (background) or suspended with Ctrl+Z. Each job has a job number (shown in brackets) that can be used with fg, bg, and kill commands using the %n syntax. The + indicates the current job, and - indicates the previous job.

How do I run a basic jobs example?

Run `jobs` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -l do in jobs?

List process IDs in addition to normal information