scp error: not a regular file

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

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like