|

楼主 |
发表于 2003-11-20 13:32:38
|
显示全部楼层
最初由 r2007 发表
ls -u --full-time
谢谢~~~我笨。。。
现在能精确到秒了。还有什么错误清大家指出来。。。。。。。。
########code
#!/bin/bash
count=0
time_old=`ls -u --full-time /etc/passwd|awk '{print $6,$7,$8}'`
while true; do
time_now=`ls -u --full-time /etc/passwd|awk '{print $6,$7,$8}'`
if [[ ${time_now} != ${time_old} ]] ; then
count=$(($count + 1))
time_old=${time_now}
fi
if [[ $count == 2 ]];then echo "the file already access over 2 time";exit 0;fi
sleep 0.1
done
#end
再问问,那后面那么多000000000,还有 +0800 是什么意思? |
|