Uncategorized 0 Comments

I just needed a way to detect regularly if a file has been changed recently. The solution I came up with was this: now=`date +%s` mtime=`stat -c %Z /some/file` if [ $((now – mtime)) -gt 3600 ]; then     echo “xy seems to be out-of-date.” fi This checks the current time and the modification time of

Read More