Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Last active April 7, 2021 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miguelmota/c3d934057989e0d0b83eb7df7f21a336 to your computer and use it in GitHub Desktop.
Save miguelmota/c3d934057989e0d0b83eb7df7f21a336 to your computer and use it in GitHub Desktop.
Linux file audit to detect file changes using auditd, auditctl, ausearch. This can be used to get PID unlike inotify
touch hello.txt
sudo auditd
sudo auditctl -w $PWD/hello.txt -p warx -k hello-file
echo 'hello world' > hello.txt
sudo ausearch -k hello-file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment