Manipulating Jobs

Jobs running in the foreground are suspended by typing Ctl-z (Control-z). So instead of waiting for the long-running split command to complete, it is interrupted using Ctl-z:

					$ split —5000 hugefile
					Ctl-z
					[3] + Stoppedsplit —5000 hugefile
					$
				

Stopped and backgrounded jobs are brought back into the foreground with the fg command. If no argument is given, the current (most recently stopped or backgrounded) job is used. The stopped split job is brought back into the foreground with fg:

					$ fg
					split —5000 hugefile
				

Stopped jobs are put into the background with the bg command. If no argument is given, the most recently stopped job is used. In the next example, we want to put the split job back in the background. It is currently running ...

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The 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.