|
FREE # cat tmp
#!/usr/bin/perl -w
@time_access_old=system("ls" , "-luT" , "/etc/passwd" );
$count=0;
while (1) {
@time_access_now =system( "ls" , "-luT" , "/etc/passwd" );
if ( @time_access_old != @time_access_now ) {
$count++;
@time_access_old=@time_access_now;
last if ( $count == 6);
}
sleep (1);
}
print "OK, successfully ! \n";
这是在FreeBSD的脚本,ls -luT的内容被输出了。要是在LINUX,显示精确的时间是ls -lu --full-time 详细看man
怎么能不输出呢,我只要结果:ask :ask:ask |
|