批量删除文件名中包含的空格(最新方法)

劳整理+详细记录:十部高分印度悬疑电影推荐,反转+烧脑

参考:https://stackoverflow.com/questions/2709458/how-to-replace-spaces-in-file-names-using-a-bash-script

bash 4.0才支持的脚本:

#!/bin/bash
shopt -s globstar
for file in **/*\ *
do
mv "$file" "${file// /_}"
done