I am trying to copy a directory from my local machine to a remote machine.
Here is the command I am using;
sudo scp /run/media/orcacomputers/DataCabinet/fileBackups/centos6-root/etc/httpd/conf.d/ :root@ip/etc/httpd/conf.d
What am I doing wrong here?
2 Answers
You are missing the -r option that is required to copy a directory and its contents.
From man scp:
-r Recursively copy entire directories.
So your command would be:
sudo scp -r /run/media/orcacomputers/DataCabinet/fileBackups/centos6-root/etc/httpd/conf.d/ root@ip:/etc/httpd/conf.d 8 move into localhost files from server
scp -r root@132.93.78.55:/var/www/html/foldername/ /var/www/html/foldername 1