linux下批量修改文件后缀的方法
发布时间:2014-07-20 编辑:jiaochengji.com
linux下批量修改文件后缀的方法
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]#
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 命令吧。
您可能感兴趣的文章:
linux下批量修改文件后缀的方法
shell批量修改文件后缀名
bash批量修改文件名称的方法总结
linux批量修改文件名的shell脚本
批量追加文件后缀名的批处理脚本
dos命令批量修改文件扩展名的例子
批量替换当前目录后缀名的批处理脚本
一个批量修改文件后缀名的php函数
php批量更改数据库表前缀的方法
探讨:批量修改文件名的shell脚本
[关闭]