批量替换文件名中的指定字符串

Rocky大约 1 分钟

方法一

比较通用

find ./ -name "*keyword*" | while read f; do mv $f ${f/keyword/targetword}; done

命令解释:找出文件名中有 keyword 字符串的文件,然后通过mv命令把 keyword替换为targetword


系统推荐









  • 随机毒鸡汤:单身狗冬天就不要出去了,要是摔倒了,会变成旺旺碎冰冰的。

    Serene view of the Summer Palace with its historical architecture reflecting in the lake at sunset.