Comments on How to run commands on File or Directory changes with Incron on Ubuntu 16.04

This tutorial shows you how you can use incron on an Ubuntu 16.04 system to run commands when a file or directory is changed. The incron daemon is similar to cron, but instead of running commands based on time, it can trigger commands when a file or directory event occurs (e.g. a file modification, changes of permissions, etc.).

2 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Patrick Gill

Interesting tool!  I hadn't heard about it before.  How bullet proof is it?  For example, is it recommended for such things as a remote duplication system; you could have a pair of directories that automatically synch to each other? (You'd want to run this in conjunction with a proper backup system too, I bet.)

I know about rsync; however it doesn't use inotify so it has to check lots of files to notice changes.  Is this a better way?

Best,

Patrick

By: Michael

Nice one.

I use this on Debian 8 to automatically compress files with brotli and zopfli for a webserver uploaded with ftp.