linux下批量修改文件后缀的方法
时间:2015-05-01 23:30 来源:linux.it.net.cn 作者:IT
1、偶发现的一个命令哦
rename .h .c *.h
2、实例
[root@localhost client]# ls
apitest.c client.c client.h main.c Makefile net.c net.h pass.c testmulti.sh test.sh util.h
[root@localhost client]# rename .c .txt *.c
[root@localhost client]# ls
apitest.txt client.h client.txt main.txt Makefile net.h net.txt pass.txt testmulti.sh test.sh util.h
[root@localhost client]#
看到了吧,所有.c扩展名全部修改成了.txt。
有兴趣的朋友,好好研究下 rename 命令吧。
(责任编辑:IT)
1、偶发现的一个命令哦
[root@localhost client]# ls
apitest.c client.c client.h main.c Makefile net.c net.h pass.c testmulti.sh test.sh util.h [root@localhost client]# rename .c .txt *.c [root@localhost client]# ls apitest.txt client.h client.txt main.txt Makefile net.h net.txt pass.txt testmulti.sh test.sh util.h [root@localhost client]#
看到了吧,所有.c扩展名全部修改成了.txt。 (责任编辑:IT) |