O'Reilly logo

Korn Shell: Unix and Linux Programming Manual, Third Edition, The by Anatole Olczak

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checking Job Status

The status and other information about all jobs is displayed using the jobs command. The following jobs output shows that there is one stopped job, and two running jobs. The + indicates the current job, and indicates the previous job:

					$ jobs
					[3]  + Stopped            split —5000 hugefile
					[2]  — Running            find / —name core —print &
					[1]    Running            sleep 25 &
				

The jobs –l command shows the same information, along with the process ids, while jobs –p only gives you the process ids.

					$ jobs —l
					[3]  + 466 Stopped split —5000 hugefile
					[2]  — 465 Running find / —name core —print &
					[1]    463 Running sleep 25 &
				

Killing Jobs

Stopped or background jobs are terminated with the kill command. Unlike bg or fg, a job argument must be given. Here, a sleep

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required