Skip to main content
Kill -9 Club
Sign in

job number (jobspec)

Processes

The [1] bash prints when you background a command: one shell's private bookkeeping, written %1 when you want to name it. It is not a PID. jobs -l prints the table, and that table dies with the shell that holds it — open a second SSH session and its jobs is empty, while ps shows the process perfectly well. Numbers are reused as soon as a job leaves the table, so %1 an hour later is not necessarily the %1 you remember. The reach differs too. kill 1841 signals one process; kill %1 signals the job's whole process group — and a job is a whole pipeline: sleep 300 | cat & is one job holding two processes, and both of them receive the signal.

Also written: jobspec, job spec, %1