官术网_书友最值得收藏!

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
主站蜘蛛池模板: 天峻县| 泌阳县| 突泉县| 曲周县| 云梦县| 分宜县| 花垣县| 婺源县| 大邑县| 搜索| 东平县| 延吉市| 深水埗区| 安吉县| 科尔| 扶风县| 吉水县| 尼勒克县| 潜山县| 内黄县| 马鞍山市| 张掖市| 邢台县| 柘荣县| 论坛| 寿光市| 阳江市| 汉沽区| 明水县| 湘潭市| 黑龙江省| 建阳市| 武汉市| 班玛县| 焉耆| 新乐市| 左云县| 颍上县| 铜梁县| 蒙山县| 平度市|