[linux]文件重命名
2015-08-26 22:48
656 查看
把当前目录下的所有t.txt一次性重命名为t2.txt
1. find . -name 't.txt' -execdir mv {} t2.txt \;
2. find -name 't.txt' -exec bash -c 'mv "$0" "${0/t.txt/t2.txt}"' {} \;
3.find -name "t.txt" -print0 | xargs -0 rename "s/t\.txt/t2\.txt/"
http://tldp.org/LDP/abs/html/parameter-substitution.html http://ask.xmodulo.com/rename-multiple-files-linux.html
1. find . -name 't.txt' -execdir mv {} t2.txt \;
2. find -name 't.txt' -exec bash -c 'mv "$0" "${0/t.txt/t2.txt}"' {} \;
3.find -name "t.txt" -print0 | xargs -0 rename "s/t\.txt/t2\.txt/"
http://tldp.org/LDP/abs/html/parameter-substitution.html http://ask.xmodulo.com/rename-multiple-files-linux.html
相关文章推荐
- Linux内核中的cmpxchg函数
- Linux磁盘管理与文件系统
- 【Linux常用命令】时间命令
- [linux]find命令
- centos6.7安装图文教程
- Linux服务管理-源码包的管理
- Linux回调函数
- Linux下NAO机器人开发环境搭建完全教程(Version2.0)
- sougou for linux
- Note For Linux By Jes(12)-认识系统服务(daemons)
- linux 本地cd yum 设置
- Note For Linux By Jes(11)-程序管理与SELinux 初探
- ruby on rails 在centos 7下的安装配置
- centos 6.7 安装注意事项
- Linux 关于动态链接库以及静态链接库的一些概念
- linux下byte to byte 比较文件
- CentOS配置VSFTP服务器
- centos 版本
- linux 根据sp和fp查调用栈
- Linux用户管理