切换到某目录,将该目录下文件名中str1字段都替换成str2字段
for filename in `ls` do mv $filename ${filename//str1/str2} done
x=0 for filename in `ls *.gif` do new_name=`printf "MM_%02d.gif" $x` mv $filename $new_name ((++x)) done