suspended job processes


I was playing with the mail command and I seem to have left it suspended and don't know how I did it or how to get it back. I didn't even realize this untill I typed exit and it returned "There are suspended jobs". I played with jobs and when I type jobs -l it comes back with
[1] + 852 Suspended mail -s two -c Gabe@

What did I do to suspend this process? How do I get back into it? Is this like putting an application in the background?



Baron in the Trees
Exactly, suspending a job "is like putting an application in the background". You usually do that by appending an & to the command, for example:

> find -name "abcxyz" / &

The other method would be to press CONTROL + Z, which has the same effect.

To view your background activities, type in 'jobs', well, you know about that. It's a shell built-in. And another tcsh built-in (I am not sure about other shells right here) would be 'fg' (foreground) which brings the process "back to life".

That comes handy in your case, since you do not want to kill your mail.


Swollen Member
running a background process with & and stopping a job aren't quite the same. for one, you can't leave stopped jobs hanging around (ie they die when you log out). and i think & leaves the process running, while control-z actually stops the process. generally speaking, use & when you want to run something in the background, and use control-z when you're doing something and want to go do something else and come back.