- 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.
推薦閱讀
- Hands-On Image Processing with Python
- Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API
- 基于差分進化的優化方法及應用
- 薛定宇教授大講堂(卷Ⅳ):MATLAB最優化計算
- Visual Basic程序設計習題解答與上機指導
- Mastering macOS Programming
- 快速念咒:MySQL入門指南與進階實戰
- 單片機應用與調試項目教程(C語言版)
- 深入分布式緩存:從原理到實踐
- App Inventor創意趣味編程進階
- Java程序員面試筆試寶典(第2版)
- C編程技巧:117個問題解決方案示例
- Practical Predictive Analytics
- 百萬在線:大型游戲服務端開發
- Selenium Essentials