for file in `ls *.txt`;do mv $file `echo $file|sed 's/2-1/1-1/g'`;done 修改前 修改后 ref:shell腳本:批量修改文件名(刪除文件名中字符)-模范生的學(xué)習(xí)博客-51CTO博客