1.查找当前目录下文件扩展名为"JPG"的文件数量
find . -type f -name '*.JPG' | wc -l
2.把当前目录下文件中的大写英文字母更改为小写
for file in *.*
do newname=`echo $file | tr "[A-Z]" "[a-z]"`
mv -f $file $newname 2>/dev/null
done
3.查找当前目录下扩展名为"JPG"的文件并修改为"jpg"
find . -type f -name '*.JPG' -exec rename 'JPG' 'jpg' {} \;