In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the use of linux rename command batch change file name, the text is very detailed, has a certain reference value, interested friends must read!
The rename command changes file names in batches using string substitutions.
Original string: The string whose filename needs to be replaced;
Target string: Replace the original characters contained in the file name with the target string;
Files: Specifies the list of files whose names you want to change.
Syntax format: rename [parameter]
Common parameters:
? Can replace a single character * Can replace multiple characters
Reference Example
Rename main1.c to main.c:
[root@linuxcool ~]# rename main1.c main.c main1.c
Rename all files ending in jpg to files ending in png:
[root@linuxcool ~]# rename .jpg .png *.jpg
The folder contains these files: foo1, …, foo9, foo10, …, foo163, rename the files foo1 to foo9 to foo01 to foo09:
[root@linuxcool ~]# rename foo foo0 foo?
Rename all files foo01 to foo99 to foo001 to foo099:
[root@linuxcool ~]# rename foo foo0 foo??
Rename all files foo001 to foo163 to foo0001 to foo0163:
[root@linuxcool ~]# rename foo foo0 foo*
Rename all files foo0100 to foo0163 to foo100 to foo163:
[root@linuxcool ~]# rename foo0 foo0[1]* The above is all the contents of using the Linux rename command to change file names in batches. Thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to 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.
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.