2006年9月25日

bash比较文件时间和当前时间

摘要: ft=`date+%Y%m%d%H%M%S-Iseconds-rfilea`ct=`date+%Y%m%d%H%M%S-Iseconds`if["$ct"-gt"$ft"]thenecho"CurrentTimeLargethanfiletime"echo"$ct-$ft="echo$[$ct-$ft]fi上面的秒数计算是不对的。echo $[`date +%H` * 3600 + `date +... 阅读全文

posted @ 2006-09-25 22:14 CrazyWill 阅读(2187) 评论(0) 推荐(0) 编辑

导航