- 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.
推薦閱讀
- iOS面試一戰到底
- Delphi程序設計基礎:教程、實驗、習題
- Network Automation Cookbook
- 羅克韋爾ControlLogix系統應用技術
- Mastering Kali Linux for Web Penetration Testing
- 自然語言處理Python進階
- Mastering Linux Network Administration
- Flutter跨平臺開發入門與實戰
- 大數據分析與應用實戰:統計機器學習之數據導向編程
- WordPress 4.0 Site Blueprints(Second Edition)
- C語言開發基礎教程(Dev-C++)(第2版)
- Windows Embedded CE 6.0程序設計實戰
- Flowable流程引擎實戰
- Magento 2 Beginners Guide
- 例說FPGA:可直接用于工程項目的第一手經驗