- 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
推薦閱讀
- Apache ZooKeeper Essentials
- Visual Studio 2012 Cookbook
- 自己動手寫Java虛擬機
- Android 7編程入門經典:使用Android Studio 2(第4版)
- Effective Python Penetration Testing
- JavaScript入門經典
- 網站構建技術
- Python編程實戰
- BeagleBone Robotic Projects(Second Edition)
- Mastering Bootstrap 4
- 3ds Max 2018從入門到精通
- Raspberry Pi Robotic Projects
- Android從入門到精通
- 面向對象分析與設計(第3版)
- 大象:Thinking in UML(第二版)