Linux administrator should be familiar with CLI environment. Since GUI mode in Linux servers is not a common to be installed. SSH may the most popular protocol to enable Linux administrator to manage the servers via remote in secure way. Built-in with SSH command there is SCP command. SCP is used to copy file(s) between servers in secure way.
The below command will read as “copy source_file_name” into “destination_folder” at “destination_host” using “username account”.
Basic syntax of SCP
There are much parameters in SCP command that you can use. Here are the parameters that may useful on daily basis usage.
Provide the detail information of SCP process using -v parameter
Basic SCP command without parameter will copy the files in background. User will see nothing unless the process is done or some error appears. You can use “-v” parameter to print debug information into the screen. It can help you debugging connection, authentication and configuration problems.
Sample Output
Provide modification times, access times, and modes from original files
The “-p” parameter will help you on this. An estimated time and the connection speed will appear on the screen.
Sample Output
Make file transfer faster using -C parameter
One of parameter that can faster your file transfer is “-C” parameter. The “-C” parameter will compress your files on the go. The unique thing is the compression is only happen in the network. When the file is arrived to the destination server, it will returning into the original size as before the compression happen.
Take a look of these commands. It is using a single file of 93 Mb.
Thank you for Sharing Nice Guide ,
ReplyDeleteCould i copy a single file to multiple server at a time Using a SINGLE command ??
I don't want to make any scripts. Sir Is it possible ?
linux scp