Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Inotifywait notes

This is probably my most useful snippet for inotifywait. It will watch all items underneath /tmp/qux for the listed events and use the time format listed. Unfortunately I was unable to get it to emit UTC timestamps, but that's OK because I can at least get it to display the offset.

inotifywait -m --exclude '(.*.swp|.git.*)' -r /tmp/qux -e modify,moved_to,move_self,create,delete,delete_self --format '%T % e %w%f' --timefmt '%FT%T%z'

Comments