You are looking for gnu screen
Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g., insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows the user to move text regions between windows. When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill the current window, view a list of the active windows, turn output logging on and off, copy text between windows, view the scrollback history, switch between windows, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the users terminal.
In a nutshell it allows you to create "virtual terminals" that remain active until you kill them yourself.
Any process running in a screen session remains active. If your ssh session terminates you just start a new session and re-attach the screen.
This article provides a good tutorial
cp
ormv
process"? Usually shell already forks and executes those programs. What is your goal? Resuming copies? Seersync
.rsync
was the best answer here. I did a basicrsync -r /path/to/source /path/to/destination &
, exited out of my remote SSH session and left it for a good while. Connected again over SSH to check the destination and... voila! All the files were copied over! Thank you @Lekensteyn for the suggestion. If you want to put that into an answer I will vote for it.rsync
gets interrupted, you will still be left with a temporary file. It just helps you by not having to copy existing files over. What you actually need for persistent sessions is GNU screen as poste by Jake.