答案1
使用rename
:
rename 's/ empty\.empty$/.empty/' *empty.empty
您可能需要安装rename
:
sudo apt install rename
替代纯的bash
:
for d in *empty; do
mv -i "$d" "${d% empty*}.empty"
done
使用rename
:
rename 's/ empty\.empty$/.empty/' *empty.empty
您可能需要安装rename
:
sudo apt install rename
替代纯的bash
:
for d in *empty; do
mv -i "$d" "${d% empty*}.empty"
done