jobs
Official Description
Displays the status of jobs in the current session.
Syntax
jobs [-l | -p] [-p] job_id...
Options
-l provides more information about each job listed.
-p displays only the process ID.
-n displays jobs that have stopped, exited, or otherwise had a change of status.
Oddities
Can optionally specify jobs with %string, where string is some characters from the beginning of the name of the command being run within the job.
Example
$ buzz& # Start two background jobs [1] 901 $ buzz& [2] 902 $ $ jobs # Display jobs [2] + Running buzz& [1] - Running buzz& $ $ jobs –l # Include pids [2] + 902 Running buzz& [1] - 901 Running buzz& $ $ jobs –p # Display pids only 902 901
Get Korn Shell Programming by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.