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

  • Learn Linux Quickly
  • Ahmed AlKabary
  • 92字
  • 2021-06-11 18:43:48

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
主站蜘蛛池模板: 林芝县| 闽清县| 利川市| 华坪县| 长顺县| 崇阳县| 且末县| 罗平县| 若羌县| 绍兴县| 新巴尔虎右旗| 德安县| 宁远县| 土默特右旗| 白玉县| 昌图县| 青海省| 庆元县| 民勤县| 宁德市| 新绛县| 麟游县| 安图县| 余姚市| 松江区| 茂名市| 泾源县| 潞西市| 开原市| 永吉县| 延寿县| 崇信县| 冷水江市| 拉萨市| 阳谷县| 泰和县| 福建省| 福清市| 佛冈县| 密云县| 秀山|