[root@liuwei test]# ls
11.txt 12.txt 13.txt 14.txt 15.txt 16.txt 17.txt 18.txt 19.txt 1.txt 20.txt 2.txt 3.txt 4.txt 5.txt 6.txt 7.txt 8.txt 9.txt
[root@liuwei test]# rename .txt .txt.bak *
[root@liuwei test]# ls
11.txt.bak 13.txt.bak 15.txt.bak 17.txt.bak 19.txt.bak 20.txt.bak 3.txt.bak 5.txt.bak 7.txt.bak 9.txt.bak
12.txt.bak 14.txt.bak 16.txt.bak 18.txt.bak 1.txt.bak 2.txt.bak 4.txt.bak 6.txt.bak 8.txt.bak
[root@liuwei test]# rename .bak "" *
[root@liuwei test]# ls
11.txt 12.txt 13.txt 14.txt 15.txt 16.txt 17.txt 18.txt 19.txt 1.txt 20.txt 2.txt 3.txt 4.txt 5.txt 6.txt 7.txt 8.txt 9.txt
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/277643.html