- 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
推薦閱讀
- Mastering Visual Studio 2017
- 企業級Java EE架構設計精深實踐
- Boost C++ Application Development Cookbook(Second Edition)
- Mastering Python Scripting for System Administrators
- SharePoint Development with the SharePoint Framework
- Python深度學習原理、算法與案例
- 響應式Web設計:HTML5和CSS3實戰(第2版)
- 從Excel到Python數據分析:Pandas、xlwings、openpyxl、Matplotlib的交互與應用
- 愛上C語言:C KISS
- Python預測之美:數據分析與算法實戰(雙色)
- Python網絡爬蟲實例教程(視頻講解版)
- 軟件測試分析與實踐
- Java程序設計實用教程(第2版)
- 虛擬現實:引領未來的人機交互革命
- WCF編程(第2版)