官术网_书友最值得收藏!

Copying multiple directories

You can also copy multiple directories the same way you copy multiple files; the only difference is that you have to pass the recursive -r option to the cp command.

To demonstrate, create the three directories d1, d2, and d3 in Elliot's home directory:

elliot@ubuntu-linux:~$ mkdir d1 d2 d3

Now you can copy all three directories to /tmp by running the cp -r d1 d2 d3 /tmp command:

elliot@ubuntu-linux:~$ cp -r d1 d2 d3 /tmp
elliot@ubuntu-linux:~$ cd /tmp
elliot@ubuntu-linux:/tmp$ ls
apple.txt banana.txt carrot.txt cats2.txt cats.txt cities d1 d2 d3
主站蜘蛛池模板: 新巴尔虎左旗| 沂南县| 新乐市| 海阳市| 安岳县| 斗六市| 娄烦县| 新昌县| 赣州市| 开封市| 祁门县| 淅川县| 淮滨县| 佳木斯市| 左权县| 临夏市| 舟曲县| 汶上县| 临清市| 巴青县| 九寨沟县| 南雄市| 兴山县| 西青区| 钦州市| 吴桥县| 合山市| 邮箱| 那坡县| 安泽县| 兴宁市| 定日县| 高阳县| 潜江市| 六安市| 北碚区| 江城| 沁阳市| 富宁县| 林甸县| 武陟县|