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

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.

主站蜘蛛池模板: 建始县| 阜新市| 深泽县| 那坡县| 石台县| 克什克腾旗| 海安县| 松潘县| 夏邑县| 于田县| 长春市| 南江县| 法库县| 怀化市| 泰顺县| 达拉特旗| 呈贡县| 沁源县| 会理县| 开阳县| 五大连池市| 阜康市| 遂川县| 大城县| 绍兴县| 牙克石市| 万山特区| 宁夏| 孝昌县| 文化| 河西区| 灵丘县| 兴安县| 宝应县| 上杭县| 贵州省| 衡东县| 方山县| 交城县| 仲巴县| 积石山|