The below output shows all the files twice as this copied into two servers. Scp /home/daygeek/2g/shell-script/output.txt passwd-up.sh $server:/opt/backup If you would like to copy the same file into multiple remote servers then create the following small shell script to achieve this. Method-2:Copy Files/Folders from local system to multiple remote system in Linux using Shell Script with scp Command? # scp -r /home/daygeek/2g/shell-script/ :/opt/backup/ This will copy the shell-script directory and associated files under /opt/backup directory. We are going to copy the shell-script directory from my local system to 2g. remote system under /opt/backup directory. # scp output.txt passwd-up.sh :/opt/backup We are going to copy two files output.txt and passwd-up.sh files from my local system to 2g. remote system under /opt/backup directory. We are going to copy the output.txt file from my local system to 2g. remote system under /opt/backup directory. Scp command allow us to copy files/folders from a local system to remote system. Method-1: Copy Files/Folders from local system to remote system in Linux using SCP Command? It provides features such as passing a password to ssh, saving output to files, and timing out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |