转换文件名中空格为下划线
无评论2011 年 11 月 30 日 at 下午 1:11分类:仅仅转载
find . -name "* *" |
while read name; do
na=$(echo $name | tr ' ' '_')
mv "$name" $na
done
#Replace all spaces in the files in current directory and subfolder with
#underline.
for x in `ls -R`; do mv "$x" `echo -n $x | tr " " "_"`; done
原文地址 http://blog.csdn.net/qazplm12_3/article/details/565093