WebFaction
Community site: login faq

I've tried following the instructions here:

http://community.webfaction.com/questions/4988/copy-one-folder-to-another-using-terminal-and-ssh

but when I enter the command

rsync --delete -a ~/webapps/site1/ ~/webapps/site2/

it puts a copy of the site1 folder inside the site2 folder. The site2 folder now contains the site1 folder in its entirety, but as a subfolder within the side2 folder.

I'd like to have site2 have exactly the same contents, at the same folder level, as site1. I can't imagine it's a matter of removing folder names, because then (I think) I'd just wind up creating duplicate folders in my main /webapps directory.

asked 26 Mar '12, 16:48

mattshepherd
4541830
accept rate: 0%


I think that

cp -r ~/webapps/site1/* ~/webapps/site2

will do what you want. Hope this helps!

permanent link

answered 26 Mar '12, 16:55

maryh
1.3k7
accept rate: 35%

That did it! Thank you! Hooray!

(26 Mar '12, 17:02) mattshepherd
1

Actually, that first command will not copy hidden files. Omitting the wildcard will let that happen:

cp -r ~/webapps/site1/ ~/webapps/site2

(31 Mar '12, 18:39) cboehner
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×103
×5
×4
×2

question asked: 26 Mar '12, 16:48

question was seen: 16,387 times

last updated: 31 Mar '12, 18:39

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM