jobs command linux, ubuntu 14.04

Instructions for use of the jobs command from the terminal.

To stop a running process:

$ ctrl + z

[1]+  Stopped                 watch -n 60 cat /proc/mdstat

List jobs with process id

$ jobs -l

[1]+ 31337 Stopped                 watch -n 60 cat /proc/mdstat

Kill job #1. If killing process while stopped, you will have to send the process to the foreground for it to be killed.

$ kill %1

$ fg %1

watch -n 60 cat /proc/mdstat

Check that the process is no longer running. No jobs will be listed and the output will be blank.

jobs -l

References

http://www.cyberciti.biz/howto/unix-linux-job-control-command-examples-for-bash-ksh-shell/