Skip to content

Instantly share code, notes, and snippets.

@miguelmota
Last active March 2, 2025 03:09
Show Gist options
  • Save miguelmota/f938b583337700e011f55a9d8a68be5e to your computer and use it in GitHub Desktop.
Save miguelmota/f938b583337700e011f55a9d8a68be5e to your computer and use it in GitHub Desktop.
Arch linux monitor folder file access
pacman -S audit
sudo systemctl enable --now auditd
# track folder
sudo auditctl -w /tmp/custom_folder_to_watch -p r -k custom_test_watch_key
# view access logs
sudo ausearch -k custom_test_watch_key
# list watchers
sudo auditctl -l
# stop tracking
sudo auditctl -W /tmp/custom_folder_to_watch -p r -k custom_test_watch_key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment