批量修改Linux文件夹下所有文件大小写

小写转大写:

[zengs@SYS SOS]$ for cpplive in *; do mv $cpplive `echo $cpplive|tr [a-z] [A-Z]`; done

 

大写转小写:

[zengs@SYS SOS]$ for cpplive in *; do mv $cpplive `echo $cpplive|tr [A-Z] [a-z]`; done

 

修改后缀:

[zengs@SYS SOS]$ for cpplive  in *.JPG; do mv $cpplive  ${cpplive%%\.*}.jpg; done

posted @ 2013-12-10 04:14  censai  阅读(1105)  评论(0编辑  收藏  举报