Copy an entire directory in linux


cp -avr /home/vivek/letters /usb/backup

Explanation
-a : Preserve the specified attributes such as directory an file mode, ownership, timestamps, if possible additional attributes: context, links, xattr, all.
-v : Explain what is being done.
-r : Copy directories recursively.

Example

cp -avr from_directory to_directory

Latest Comments

Leave a Reply

comment on this article