文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>用shell脚本完成在某个目录下保留指定日期的文件

用shell脚本完成在某个目录下保留指定日期的文件

时间:2008-04-19  来源:sdccf

作者:lg    来自:www.china-lg.com

#!/bin/sh
cd /home/pic
ls -l |while read line
do
month=`echo $line|awk '{print }'`
day=`echo $line|awk '{print }'`
#time=echo $line|awk '{print }'`
file=`echo $line|awk '{print }'`
if [ "$month" = "Nov" -a "$day" = "1" ]
then
continue
else
rm -rf $file
echo "rm $file OK!"
fi
done
相关阅读 更多 +
排行榜 更多 +
空中跑酷汉化版

空中跑酷汉化版

赛车竞速 下载
修仙传说

修仙传说

角色扮演 下载
魔界零之迷宫

魔界零之迷宫

冒险解谜 下载