Deleting processes with kill

In addition to suspending jobs and running them in the foreground and background, you can also choose to just delete them completely. For example, you might realize midway through a job that you goofed and need to redo it. Or perhaps you've accessed and suspended a man page and no longer need to reference it.

Using kill, you can delete essentially any process running or suspended on the UNIX system. As Code Listing 9.13 shows, you delete a process by first listing the processes, then using the kill command.

To kill a job with kill:

1.
jobs
At the shell prompt, type jobs, then note the number or name of the job you want to kill.
2.
kill %ftp
In most shells, you can kill jobs with kill followed by % and the job number ...

Get Unix: Visual QuickStart Guide 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.