This is one of those commands that hit me as “Whoa! How did I miss that?” — the
jobs command. It simply lists the jobs currently running on the system. Unlike
ps, it only lists what’s running in the foreground and the background. So, say you stop a process with
ctrl+z and you want to later kill it, you can use the jobs command to quickly find it and then kill it off. For example:
# dd if=/dev/zero of=/dev/null ^Z + Stopped dd if=/dev/zero of=/dev/null # jobs + Stopped dd if=/dev/zero of=/dev/null # kill %1 # jobs + Terminated dd if=/dev/zero of=/dev/null # jobs #
You can easily kill off more than one process as well by simply including the %number after
# jobs  Stopped dd if=/dev/file1 of=/dev/null - Stopped dd if=/dev/file2 of=/dev/null  Running dd if=/dev/file3 of=/dev/null & + Stopped dd if=/dev/file4 of=/dev/null # kill %3 %2 # jobs - Stopped dd if=/dev/file1 of=/dev/null  Terminated dd if=/dev/file2 of=/dev/null  Terminated dd if=/dev/file3 of=/dev/null + Stopped dd if=/dev/file4 of=/dev/null #
As always, remember to read the man pages for more information.