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

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.

主站蜘蛛池模板: 武鸣县| 稷山县| 临颍县| 称多县| 山阳县| 庆阳市| 曲阜市| 金坛市| 家居| 阳新县| 威宁| 波密县| 柳河县| 宜春市| 长武县| 辽宁省| 邓州市| 壶关县| 南雄市| 海晏县| 鹤岗市| 分宜县| 大竹县| 乌兰浩特市| 崇信县| 榆树市| 吉水县| 桑日县| 南开区| 克什克腾旗| 遂宁市| 连州市| 青海省| 武清区| 江西省| 桂平市| 罗甸县| 元阳县| 重庆市| 隆回县| 株洲县|