In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today Xiaobian to share with you the Linux mv command instance use analysis of related knowledge points, detailed content, clear logic, I believe most people are still too familiar with this knowledge, so share this article for your reference, I hope you read this article after some gains, let's take a look at it.
The mv command is used to rename files or directories, or to move files from one directory to another. Source represents the source file or directory, target represents the target file or directory. If you move a file into an existing destination file, the contents of the destination file will be overwritten.
mv(option)(parameter) cut, or move in same directory rename 1. If the destination file is a folder, the source file is moved directly into the folder, and the name is still the name of the source file. 2. If the target file is a file, the name of the source file will be changed at the same time. 3. If the source file is multiple, the target must be a directory and moved to the directory uniformly.
-b: When the target file exists, backup first and overwrite it
[root@bogon admin]# mv -b a/aa b/mv: overwrite `b/aa'? y[root@bogon admin]# ls baa aa~ bb
-f: Force overwrite when target file exists
[root@bogon admin]# mv -f a/aa b/[root@bogon admin]# ls baa bb
-i: Default option, prompt whether to overwrite when target file exists
[root@bogon admin]# mv -i a/aa b/mv: overwrite `b/aa'? y[root@bogon admin]# ls baa bb
-t: Specify target first, then source
[root@bogon admin]# mv -t b/ a/aamv: overwrite `b/aa'? y[root@bogon admin]# ls a ba:bbb:aa bb
-v: Display process
[root@bogon admin]# mv -fv a/aa b/`a/aa' -> `b/aa' Above is "Analysis of the use of mv command instances in Linux" All the contents of this article, thank you for reading! I believe everyone has a great harvest after reading this article. Xiaobian will update different knowledge for everyone every day. If you want to learn more knowledge, please pay attention to the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.