In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
The content of this article mainly focuses on how to rename the Linux file. The content of the article is clear and clear. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!
Mv and rename commands can be used for file renaming on Linux systems, where the mv command is also a command for moving files.
1 、 mvmv fromfile tofile
If the file a.txt is named b.txt, it can be mv a.txt b.txt.
Mv can only rename one file at a time, and it is a move command. If tofile already exists, the original file will be overwritten directly, resulting in the loss of the file. Of course there is an option to prompt for existing files, but I said that I really don't use that option very often. Considering these two points, I decided to take a look at rename.
2. Renamerename frompart topart filename or rename's from part to topart filename
If the file a.txt is named b.txt, it can be rename 'a'b'a.txt (this has not been tried, see what others say on the Internet, it is like this. ) it can also be: rename's / ^ a / b _ a.txt
On some systems, you can pass with the former sentence, on some systems, you can pass with the latter one. Two are different, one is C, the other is perl. It is obvious that the latter one is written in a regular expression. Which way to use, you can man rename, in the last line of the manual page to see the version. Since the version of the system rename I am using is Perl, I can only use the latter approach.
The power of rename is that you can use *,? And so on, to modify all qualified file names in batches. When you use mv, you can only write scripts and solve it in a circular way.
Thank you for your reading. I believe you have a certain understanding of "how to rename Linux files". Go to practice quickly. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!
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.