Linux: HowTo Copy a Folder [ Command Line Option ]
Example
Copy a folder called /tmp/conf to /tmp/backup:
Sample outputs:
$ cp -avr /tmp/conf/ /tmp/backup
Sample outputs:
Where,
- -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.
Linux remove entire directory including all files and sub-directories command
To remove all directories and subdirectories use rm command. For example remove *.doc files and all subdirectories and files inside letters directory, type the following command (warning all files including subdirectories will be deleted permanently):
$ rm -rf letters/
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。