Friday, January 10, 2020

Watch file/folder for change and trigger an action

My use-case is that I have an upload folder which I'd like to reindex when something is uploaded/deleted. For this I watch the file size with du command.
It should be triggered via cron or systemd timer.