- 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
推薦閱讀
- Vue.js設計與實現
- 區塊鏈架構與實現:Cosmos詳解
- Learning AWS Lumberyard Game Development
- 匯編語言程序設計(第2版)
- Python高級機器學習
- Android底層接口與驅動開發技術詳解
- Asynchronous Android Programming(Second Edition)
- Android玩家必備
- Java 9 Programming By Example
- C++程序設計教程(第2版)
- Instant Apache Camel Messaging System
- Python計算機視覺與深度學習實戰
- 城市信息模型平臺頂層設計與實踐
- TypeScript High Performance
- Java Web程序開發參考手冊