Suppose you have to run a "make" for some large project that you have on a remote server. You have SSH access to it. You want to run that make (or any other) command in background even after you close the SSH connection. Here's how to do it:
1. make myApp > /path/to/output.txt 2>&1 &
2. You will see a PID on your command line like the one shown above.
3. disown 32568
You can now close the SSH connection. The output (stdout and stderr) will be in the file specified
2>&1 redirects the stderr to stdout. More about outputing streams to a file here : (http://askubuntu.com/questions/420981/how-do-i-save-terminal-output-to-a-file see ByteCommander's anwser).