Skip to content

Instantly share code, notes, and snippets.

@jtommi
Last active August 22, 2020 16:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtommi/3dcd97818f177e12aee1a17f2063241d to your computer and use it in GitHub Desktop.
Save jtommi/3dcd97818f177e12aee1a17f2063241d to your computer and use it in GitHub Desktop.
Simple script that watches for created, deleted, modified or moved files within the specified folder. It uses inotify-tools
#!/bin/sh
sudo inotifywait -m -r -e create -e modify -e move -e delete --format '%T - Event: %e - %w%f' --timefmt '%T' /etc /var /home /boot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment