文件批量创建和修改
2015-06-09 11:31
148 查看
批量创建文件
本文出自 “滴不尽相思血泪抛红豆” 博客,请务必保留此出处http://beijgh.blog.51cto.com/8272564/1659988
[root@localhost test]# touch test{01..10} [root@localhost test]# ls test01 test02 test03 test04 test05 test06 test07 test08 test09 test102.rename批量修改文件
[root@localhost test]# ls hello02 hello03 hello04 hello05 hello06 hello07 hello08 hello09 [root@localhost test]# rename hello test hello* [root@localhost test]# ls test02 test03 test04 test05 test06 test07 test08 test09
[root@localhost test]# ls test04.log test05.log test06.log test07.log test08.log test09.log test10.log [root@localhost test]# rename .log .txt *.log [root@localhost test]# ls test04.txt test05.txt test06.txt test07.txt test08.txt test09.txt test10.txt
[root@localhost test]# ls test04.txt test05.txt test06.txt test07.txt test08.txt test09.txt test10.txt [root@localhost test]# rename .txt "" *.txt [root@localhost test]# ls test04 test05 test06 test07 test08 test09 test103.for循环修改文件名
[root@localhost test]# ls test02 test03 test04 test05 test06 test07 test08 test09 [root@localhost test]# for i in *; do mv $i $i".log" ; done [root@localhost test]# ls test02.log test03.log test04.log test05.log test06.log test07.log test08.log test09.log
本文出自 “滴不尽相思血泪抛红豆” 博客,请务必保留此出处http://beijgh.blog.51cto.com/8272564/1659988
相关文章推荐
- SLB配置
- Android实现循环平移动画示例
- 苹果开发几个常见的错误
- 同台电脑部署多组Tomcat负载均衡(或集群)
- 公司交换机arp 绑定操作
- 学习OCaml---(0)环境安装
- 英语学习的计划调整
- [uiscreen mainscreen].applicationFrame 和 bounds的区别
- Java:String、StringBuffer和StringBuilder的区别
- 两种高性能I/O设计模式(Reactor/Proactor)的比较
- Android之官方导航栏之Toolbar(Toolbar+DrawerLayout+ViewPager+PagerSlidingTabStrip)
- 临时设置 selinux
- DataGridView
- 1
- mac下卸载jdk1.7
- 软件架构杂谈(三) --- APNS
- Ubuntu 14.04一步一步安装Openstack Kilo版本-12(cinder)
- mysql行列转换方法总结
- EXCEL中字符串操作
- 微信公众平台开发(108) 微信摇一摇