scp directories ?
Can directories and the contents in them including sub-directories be copied with scp ? or, Do I need to make the directory and then use scp?
I would just use ftp but my experience with doing ftp from a linux box is painfully slow and scp is lightening fast. Thanks |
man scp
/-r Cheers, Tink |
Thanks for responding.
I have read man scp several times and had a difficult time figuring out the syntax before I was able to just copy one file or a lot of them with -r I tried your /-r and it does not work. -r copies the contents. I want to know if the directory *and* the contents can be copied in the same command step. You either missed what I was asking or I do not understand your answer. :confused: |
Say I wanted to copy directory called XYZ in my home directory from host A to my other host B and place in my home directory.
Example: cd ~ scp -r XYZ/ username@hostB:/home/username/ Its that simple. |
Thanks, I figured it out just before getting your post.
|
Quote:
try in man scp Cheers, Tink |
Summary
To summarize the solution:
Copy directories remotely with SCP in this way Code:
scp -r user1@ip:source_directory user2@ip:destination_directory To clarify the previous posts: Code:
man scp |
I asked that question 10-9-2004
|
no wonder it has 20000+ views.
|
Hmmm..
I have always just cd to the dir I want to put the data in, then
ran scp -r username@servername:/sourcedir/data data |
Quote:
|
HAHAHAHA.... I was in the middle of migrating a bunch of junk and was asked what I used. We came across this post at looking at others alternatives... pretty funny though..
|
Quote:
|
All times are GMT -5. The time now is 04:43 AM. |