inotifywait

Waits for changes to files. More information: https://manned.org/inotifywait.

inotifywait {{path/to/file}}

inotifywait {{[-m|--monitor]}} {{path/to/file}}

inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} {{path/to/directory}}

inotifywait {{[-m|--monitor]}} {{[-r|--recursive]}} --exclude "{{regular_expression}}" {{path/to/directory}}

inotifywait {{[-m|--monitor]}} {{[-t|--timeout]}} {{30}} {{path/to/file}}

inotifywait {{[-e|--event]}} {{modify}} {{path/to/file}}

inotifywait {{[-q|--quiet]}} {{path/to/file}}

inotifywait {{[-e|--event]}} {{access}} {{path/to/file}} && {{command}}