Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to make a copy of a directory via SSH? Lets say I have /directory/ and I want to make an exact copy of it to something like /directory_copy/ is it possible?

I'm using CentOS.


share|improve this question

closed as off topic by mailq, Iain, freiheit, womble, voretaq7 Aug 27 '11 at 23:00

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

Yes. But this is not a SSH thing. It is just a Linux command cp -a directory directory_copy.

share|improve this answer

If you want to do this remotely using ssh use rsync:


SOURCE or DESTINATION migth be a remote host.

The only thing that will be not be copied exactly is the time-stamp of a symbolic link.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.