
shell
hello_simon
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Linux下sort命令小结
转载http://rfyiamcool.blog.51cto.com/1030776/738551基于ip地址对/etc/hosts文件排序 $ sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n /etc/hosts-t 以点为分隔符 -k 段 -k 1,1n的意思是 第一段落,第一个字符到第一个字符 n是以数值大小 127.0转载 2014-01-21 15:31:00 · 960 阅读 · 0 评论 -
shell 日志备份
#!/bin/sh#给文件加上时间戳后缀#参数$1 文件名function filenameConvert(){ timestamp=$(date +%Y%m%d%H%M%S) #timestamp=`echo $timestamp` RETVAL=$1.$timestamp}#查找对应文件夹下的最老文件#参数$1 目录functi转载 2014-01-20 17:53:41 · 1324 阅读 · 0 评论