Skip to content

Instantly share code, notes, and snippets.

@moomindani moomindani/

Created Jun 15, 2014
What would you like to do?
Monitoring directory using inotifywait
/usr/bin/inotifywait -e create,delete,modify,move,attrib \
-mrq /etc | while read line; do
echo $line | tee -a /var/log/dirmon.log
dirmon_count=`cat /tmp/dirmon_count`
echo `expr $dirmon_count + 1` > /tmp/dirmon_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.