書名: Learn Linux Quickly作者名: Ahmed AlKabary本章字數: 98字更新時間: 2021-06-11 18:43:48
Copying multiple files
You may also want to copy multiple files at once. To demonstrate, let's begin by creating three files apple.txt, banana.txt, and carrot.txt in Elliot's home directory:
elliot@ubuntu-linux:~$ touch apple.txt banana.txt carrot.txt
elliot@ubuntu-linux:~$ ls
apple.txt carrot.txt copycats.txt dir1
banana.txt cats.txt Desktop
elliot@ubuntu-linux:~$
To copy the three newly created files to /tmp, you can run the cp apple.txt ba- nana.txt carrot.txt /tmp command:
elliot@ubuntu-linux:~$ cp apple.txt banana.txt carrot.txt /tmp
elliot@ubuntu-linux:~$ cd /tmp
elliot@ubuntu-linux:/tmp$ ls
apple.txt banana.txt carrot.txt cats2.txt cats.txt
elliot@ubuntu-linux:/tmp$
Child’s play! In general, the cp command follows the syntax:
cp source_file(s) destination
推薦閱讀
- Web程序設計及應用
- Learning Python Web Penetration Testing
- Visual C++程序設計教程
- Flink SQL與DataStream入門、進階與實戰
- 深入淺出Spring Boot 2.x
- 編譯系統透視:圖解編譯原理
- Linux操作系統基礎案例教程
- 數據結構習題解析與實驗指導
- Instant Lucene.NET
- Java7程序設計入門經典
- Node.js 6.x Blueprints
- C語言編程魔法書:基于C11標準
- Three.js Essentials
- IBM Cognos TM1 Cookbook
- OpenCV:Computer Vision Projects with Python