In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the use of linux mv command to move or rename files, I hope you will learn a lot after reading this article, let's discuss it together!
The mv command is an acronym for the word "move" and has roughly the same function as in English. You can move a file or rename it.
This is a file management command that is used very frequently, and we need to pay special attention to the difference between mv and replication: the results of mv and cp are different. The mv command is like a file "move". The name of the file has changed, but the number has not increased. The cp command is to copy files, and the number of files is increasing.
Syntax format: mv [parameters]
Common parameters:
-I if a file with the same name exists, ask the user if you want to overwrite the existing file without prompting-b create a backup-u for the file before overwriting when it exists
Move this operation only when the source file is newer than the target file, or when the target file does not exist
Reference example
Rename the file file_1 to file_2:
[root@linuxcool ~] # mv file_1 file_2
Move the file file to the directory dir:
[root@linuxcool ~] # mv file / dir
Move the directory dir1 to the directory dir2 (if directory dir2 already exists, rename it if it does not exist):
[root@linuxcool ~] # mv / dir1 / dir2
Move the files under the directory dir1 to the current directory:
[root@linuxcool] # mv / dir1/*. After reading this article, I believe you have some understanding of moving or renaming documents using linux's mv command. If you want to know more about it, welcome to follow the industry information channel. Thank you for your reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.