Copy a directory with all its contents in CentOS

This command will copy a directory with all its content to another directory,
for example you have a directory named x, you want to copy it to another directory named y

cp -dpr x y

That’s it!

One Comment to “Copy a directory with all its contents in CentOS”

  1. Marc Millon 28 December 2008 at 7:29 am #

    Hi,
    a simple

    “cp -a foo bar”

    will do the trick even a bit faster. :-)


    so long


Leave a Reply