- 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
推薦閱讀
- 深入核心的敏捷開發:ThoughtWorks五大關鍵實踐
- Hands-On Image Processing with Python
- 信息安全技術
- Python應用輕松入門
- Windows Forensics Cookbook
- C#程序設計基礎:教程、實驗、習題
- 自制編程語言
- Apache Spark 2.x for Java Developers
- 數據結構與算法分析(C++語言版)
- Scala Reactive Programming
- 基于ARM Cortex-M4F內核的MSP432 MCU開發實踐
- JavaScript+jQuery網頁特效設計任務驅動教程
- Python預測之美:數據分析與算法實戰(雙色)
- Elasticsearch搜索引擎構建入門與實戰
- RESTful Web API Design with Node.js(Second Edition)