Putty copy and paste

Putty copy and paste

Posted by: jpatt4455
Posted on: 2007-03-28 11:17:00

Need to be able to copy files from domain folder to an other.

I have tried:
cp -r domain-name1.com domain-name2.com

also tried
cp -r --copy-contents domain-name1.com domain-name2.com

both with the same result of copying the domain-name1.com directory and sub-folder and files in the sub-folders into the the target directory.

However it did not copy the files in the main domain-name1.com folder.

Anyone know the correct way to copy the contents of a folder into an other folder without getting the main source folder stuffed into the target folder?





Re: Putty copy and paste

Posted by: Mousee
Posted on: 2007-03-28 11:38:00

The correct syntax is cp -R folder1 folder2
Note the upper case 'R' wink

Re: Putty copy and paste

Posted by: misterhaan
Posted on: 2007-03-29 07:14:00

so you're getting everything from domain-name1.com/ copied to domain-name2.com/domain-name1.com/? well that's what you asked it to do ;)

try this:

cp -r domain-name1.com/* domain-name2.com/

that will say to copy everything in domain-name1.com/ to domain-name2.com/, instead of copying domain-name1.com to domain-name2.com/

track7 - my dream-hosted site

Re: Putty copy and paste

Posted by: misterhaan
Posted on: 2007-03-29 07:17:00

-R is more widely accepted, but -r works for me on dreamhost as well as my own linux systems.

track7 - my dream-hosted site

Re: Putty copy and paste

Posted by: Mousee
Posted on: 2007-03-29 07:42:00

Errr yah. I didn't quite understand the OP's problem I believe, heh. I thought (originally) they were just running the command wrong, as I understood it, their sub-directories weren't being copied properly. So I figured using the generic syntax might work to resolve any typo's or such.

Ah well... back to coffee tongue

Tags: target folderputtycopy filescopy and pastefolders