天天看點

shell 批量更改檔案或目錄名

批量更改檔案名:

1、在多個檔案後面添加.bak或者其他有規律的字元

ls  |xargs -n1 -i{} mv {} {}.bak

或者

find ./*.txt -exec mv {} {}_bak \; 

2、通用的批量更改腳本