I am connecting to my NAS over putty which is running linux on it.
I wanted to move a big directory from one location to another. Is it possible to keep the process
Start your task with 'nohup' and put it in the background with '&', e.g.:
$ nohup mv /here /there &
$ exit
and it should continue running.
Using nohup would be best solution.
The following command in your terminal may help you out to run the script using nohup and redirect the output in your desired file.
General Syntax
nohup some_command &> nohup_log_file_name.out &
Example
nohup python script.py &> nohup_log_script.out &
So, if you use the above command, you will be able to find the outputs of the command in a log file named nohup_log_script.out
You can run it as a background process as follows:
nohup mv source target &
However, you will not be able to interact with the process.
EDIT: nohup is also required to keep it running after the shell exits.
I would suggest using screen for this.
Start a new screen,
screen -S <name of your screen>
and then you can perform your commands there, detach from the screen and re-attach to it at any time.
Detach by hitting the sequence
ctrl
a
d
and re-attach by typing
screen -r
(or list the screens with screen -l
).
Also have a look at Gnu screen survival guide.