We all know that it is easy to modify the name of the image under the folder, but it is a waste of time to modify it in batches. So, is there any way to quickly modify the image name in batches? The following small series will introduce you to the method of quickly changing the name of the image under Linux.
10.11 as a number of such directories, etc. 10.11 10.12
then inside the picture .jpg .jpg files to be modified to correspond to the date, that program 1011.jpg An example of such a file name
is as follows:
The code is as follows:
#! /bin/bash
for filename in `ls`
do
echo $filename
cd $filename
file1=$ {filename%%.*}
file2=${filename##*.}
mv *.jpg $file1$file2.jpg
cd . .
done
The above is a quick introduction to the method of manually modifying the image name under Linux. This code can be used to batch modify the image name. If you need to modify the image file name in batches, you may wish to Try this method.
On Linux systems, the env command can temporarily clear Bash environment variables
In the Linux system, if you browse the webpage when you download something, it will
Use the cp command to copy files on Linux systems, but when you use the cp command
The ping command in Linux system can be used for network fault diagnosis and check
CentOS system implements SSH passwordless login method
Tips for learning Linux system commands
How to use commands to manage files in Linux
Linux ls command operation example summary
How to delete all files except a file under Linux
CentOS system installation using Subversion method
How to embed all LaTex fonts in PDF files under Linux
Linux crontab command use instance summary
How to deal with the problem of starting weblogic server error in Linux
Remove Vista SP2 network connection half open limit
Traditional desktops will become independent programs in Win 8
?Computer broadband connection; manual connection or automatic connection
Wonderful use of U disk easily bypass Win XP login password
IE browser can not download files solution
Windows operating system tips and tricks (below)
Analyze why the win7 shutdown time is long
Using Windows & nbsp; XP to achieve remote remote shutdown of the network [Figure]