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.14 shows, you delete a process by first listing the processes, then using the kill command.

Code Listing 9.14. Using kill plus the PID number, you can delete practically any process running or suspended on the system.
$ ps –a f PID TTY STAT TIME COMMAND 15911 p1 S 0:00 /bin/login -h calvin → raycomm.com ...

Get Unix Third Edition: 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.