慢慢赚钱博客

10月 5 2017

linux 批量去除文件名空格

去除空格

for loop in `ls -1 | tr ' ' '#'`

do

mv "`echo $loop | sed 's/#/ /g' `" "`echo $loop |sed 's/#//g' `" 2> /dev/null

done

Written by admin