HowTo Copy a Folder

参考: http://www.cyberciti.biz/faq/copy-folder-linux-command-line/
In this example copy /home/vivek/letters folder and all its files to /usb/backup directory:

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

-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.

Copy a folder called /tmp/conf to /tmp/backup:
$ cp -avr /tmp/conf/ /tmp/backup

posted @ 2016-04-26 12:15  qike  阅读(165)  评论(0编辑  收藏  举报