- Learn Linux Quickly
- Ahmed AlKabary
- 106字
- 2021-06-11 18:43:48
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.
推薦閱讀
- Rake Task Management Essentials
- MariaDB High Performance
- Kinect for Windows SDK Programming Guide
- SQL Server數(shù)據(jù)庫(kù)管理與開(kāi)發(fā)兵書(shū)
- AIRIOT物聯(lián)網(wǎng)平臺(tái)開(kāi)發(fā)框架應(yīng)用與實(shí)戰(zhàn)
- 西門(mén)子S7-200 SMART PLC編程從入門(mén)到實(shí)踐
- 0 bug:C/C++商用工程之道
- Python爬蟲(chóng)、數(shù)據(jù)分析與可視化:工具詳解與案例實(shí)戰(zhàn)
- 響應(yīng)式Web設(shè)計(jì):HTML5和CSS3實(shí)戰(zhàn)(第2版)
- Data Science Algorithms in a Week
- 和孩子一起學(xué)編程:用Scratch玩Minecraft我的世界
- Apache Solr for Indexing Data
- Mastering XenApp?
- Swift 2 Blueprints
- SAP HANA Cookbook