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

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
主站蜘蛛池模板: 达孜县| 富阳市| 花垣县| 竹山县| 长丰县| 孝昌县| 堆龙德庆县| 武义县| 云安县| 永仁县| 阳曲县| 建德市| 临江市| 阿克| 共和县| 岐山县| 吉木萨尔县| 达拉特旗| 固安县| 三门峡市| 新昌县| 宜宾市| 彩票| 新邵县| 府谷县| 江城| 乌拉特中旗| 靖宇县| 淮滨县| 西吉县| 井冈山市| 红原县| 虹口区| 平遥县| 家居| 美姑县| 岱山县| 孟连| 奉节县| 靖州| 岑溪市|