Copy a directory with its contents in CentOS

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

cp -dpr x

or

cp -a x y
%d bloggers like this: