As we already know that Linux is command based platform so if you are a beginner then you have to know about Linux commands. In this article we are going to explain about "scp command" and how to execute them in background. In Linux SCP command is mainly used to copy files and directories between servers. To use scp command you have to login as a root user and scp command also require password authentication to run this command. Through scp command you can securely copy files without using FTP software.

If you want to execute scp command i background so that no other processes affected then you have to use following command:

Code:
$ nohup SOME_COMMAND &
nohup” command is used to run Linux command in background. Let’s know more about it.

there is one essential thing with scp command that it require password authentication to execute process in background. Enter the following command :

Code:
$ nohup scp file_to_copy user@server:/path/to/copy/the/file > nohup.out 2>&1
After entering the above command now you have to press ctrl +z to suspend the command temporarily and again enter following command:

Code:
$ bg
Through this command the entire process will start executing in background.
Author
bhawanisingh
Views
26,971
First release
Last update
Rating
0.00 star(s) 0 ratings
Top