Linux中批量把文件名大写改成小写

Posted on 2009-06-01 17:26 林光炎 阅读(958) 评论(0)  编辑  收藏 所属分类: LINUX
for fname in *; do mv $fname `echo $fname|tr [A-Z] [a-z]`; done
变换后如果有相同的文件名会被覆盖掉的,可以加个参数

for each in *; do mv -i $each `echo $each|tr A-Z a-z`;done 

 cat zeus-schema.sql|tr [A-Z] [a-z] >zeus-schema1.sql

posts - 104, comments - 33, trackbacks - 0, articles - 0

Copyright © 林光炎