- 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.
推薦閱讀
- 大話PLC(輕松動(dòng)漫版)
- FuelPHP Application Development Blueprints
- iOS 9 Game Development Essentials
- 基于差分進(jìn)化的優(yōu)化方法及應(yīng)用
- 征服RIA
- Python:Master the Art of Design Patterns
- HTML5+CSS3網(wǎng)頁(yè)設(shè)計(jì)
- 用戶體驗(yàn)增長(zhǎng):數(shù)字化·智能化·綠色化
- 微信小程序項(xiàng)目開發(fā)實(shí)戰(zhàn)
- Jenkins Continuous Integration Cookbook(Second Edition)
- Python算法指南:程序員經(jīng)典算法分析與實(shí)現(xiàn)
- Multithreading in C# 5.0 Cookbook
- Swift 4從零到精通iOS開發(fā)
- Java語言程序設(shè)計(jì)教程
- Oracle GoldenGate 12c Implementer's Guide