Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How to Copy the entire folder contents (including sub-folders and their contents) to another folder using PUTTY? Is there any command for that?

share|improve this question

migrated from stackoverflow.com May 3 '11 at 13:46

This question came from our site for professional and enthusiast programmers.

    
Do you want to copy the files to another system, or simply within the same system? –  Marc B May 2 '11 at 16:06

3 Answers 3

Linux

use cp command for this

for example :

cp -r /home/hope/files/* /home/hope/backup

Windows

use XCopy

For example:

xcopy c:\temp3 /e
share|improve this answer

If you have access to a bash shell you can use the following command:

cp -r /home/dir_to_copy . - Copies dir_to_copy and all its contents (sub-directories and files) to the current directory.

cp -r dir_to_copy/* bak_dir - Copies just the contents (sub-directories and files) of dir_to_copy to a backup directory named bak_dir, however dir_to_copy is not copied.

I hope this helps.

share|improve this answer
    
@gourav I'm assuming that you are using Putty to log in into a Linux box. –  bacchus May 2 '11 at 16:17

What you are looking for is pscp. It can be found on the same website as putty : http://www.chiark.greenend.org.uk/~sgtatham/putty/ Have fun!

EDIT : I presume that your trying to get the files from one system to another, hence the use of putty.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.