Is there a way to see how often a file is being updated?
I mean I need to see if the modification time of a file is updated in a dynamic way (same as tail
shows if the file is updated in a dynamic way).
I can not use e.g. tail
since the contents of the file are not appended, but overwritten and could be overwriten with the same value so I can not make a concusion.
How about this:
You can use inotifywait to do this much more efficiently for example
Will watch the file /tmp/fred/1 for modify events so updading it produces output like
You can log multiple events, change the time format (the timefmt takes strftime formatting) output to a file and daemonize e.g
so now you can just tail /tmp/watch.out.
You can also use 'audit' daemon /etc/audit/auditd.conf is configuration file for audit daemon /etc/audit/audit.rules contains audit rules