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

Moving one file

Sometimes, you may want to move a file (or a directory) to a different location instead of copying and wasting disk space.

To do this, you can use the mv command. For example, you can move the file copycats.txt from Elliot's home directory to /tmp by running the mv copycats.txt /tmp command:

elliot@ubuntu-linux:~$ mv copycats.txt /tmp
elliot@ubuntu-linux:~$ ls
apple.txt carrot.txt cities d2 Desktop Downloads
banana.txt cats.txt d1 d3 dir1 Pictures
elliot@ubuntu-linux:~$ cd /tmp
elliot@ubuntu-linux:/tmp$ ls
apple.txt carrot.txt cats.txt copycats.txt d2
banana.txt cats2.txt cities d1 d3

Notice that copycats.txt is now gone from Elliot's home directory as it relocated to /tmp.

主站蜘蛛池模板: 玉树县| 马山县| 邛崃市| 海宁市| 瑞金市| 耒阳市| 津市市| 浦城县| 天门市| 大安市| 宜丰县| 沾化县| 奉化市| 乌审旗| 旌德县| 分宜县| 德化县| 新干县| 眉山市| 睢宁县| 东乡| 三江| 赤城县| 印江| 玉树县| 邯郸县| 林芝县| 密云县| 宁蒗| 治多县| 四子王旗| 永济市| 岫岩| 株洲市| 青冈县| 曲麻莱县| 陆河县| 页游| 海晏县| 北票市| 莱阳市|