2 ms·
Does anybody have a good "execute a command when nothing changes" tool? I have some situations where I'd like to take action if, say, a file hasn't had its mtim
by EvanAnderson 4y ago
Does anybody have a good "execute a command when nothing changes" tool? I have some situations where I'd like to take action if, say, a file hasn't had its mtime updated in 24 hours.
- pitaj 4y agoDoes it need to be precise? I'd probably just use an hourly cron job.
- yabones 4y agoNot sure if there's a way to do it instantly, but one way is to just run a find command in a cron job every X hours: find /foo/bar -type f -mtime +1 | xargs foobar
- deadfece 4y agofind's own exec option is usually good enough for most things: -exec foobar {} +