Friday, April 19, 2013

// // Leave a Comment

File transfer in background using SCP

For scping large files, it is best to let them run in the background.

follow the steps below to transfer files using SCP command in the background

1) execute the normal scp command, eg:
# scp localfile.tar.bz2 user@server.ch:/path/on/server/

2) after confirming the key and authentificating (if necessary), you can "stop" the job by pressing : ctrl + Z
[1]+ Stopped scp localfile.tar.bz2 user@server.ch:/path/on/server/

3) then you can proceed the job in the background by typing
# bg
[1]+ scp localfile.tar.bz2 user@server.ch:/path/on/server/ &


4) finally, to make sure the process is working in background, issue the “jobs” command
# jobs
[1]+ Running scp localfile.tar.bz2 user@server.ch:/path/on/server/ &


Now the session can be exited with the file transfer unaffected.

0 comments:

Post a Comment