1 [root@lijun ~]#ls 2 anaconda-ks.cfg
创建0-9 10个文件 3 [root@lijun ~]#touch file{0..9}.conf 4 [root@lijun ~]#ls 5 anaconda-ks.cfg file0.conf file1.conf file2.conf file3.conf file4.conf file5.conf file6.conf file7.conf file8.conf file9.conf
将所有.conf后缀的文件,批量改名为.conf.bak 6 [root@lijun ~]#rename .conf .conf.bak *.conf 7 [root@lijun ~]#ls 8 anaconda-ks.cfg file0.conf.bak file1.conf.bak file2.conf.bak file3.conf.bak file4.conf.bak file5.conf.bak file6.conf.bak file7.conf.bak file8.conf.bak file9.conf.bak
将所有.conf.bak后缀的文件,批量改名为.conf 9 [root@lijun ~]#rename .conf.bak .conf *.conf.bak 10 [root@lijun ~]#ls 11 anaconda-ks.cfg file0.conf file1.conf file2.conf file3.conf file4.conf file5.conf file6.conf file7.conf file8.conf file9.conf 12 [root@lijun ~]#
标签:rename,cfg,lijun,conf,root,bak From: https://www.cnblogs.com/LiJunboke/p/16750795.html