2

How do I monitor from this moment on what files get accessed / modified / created / deleted. (in live mode), similar to fseventer / fslogger?

  • Now I changed the title, as I'm interested about the process, not to shop anything. – user1861388 May 7 '16 at 19:05
5

On unix system you can use inotify-tools, built on top of inotify kernel subsystem API.

By inotifywait you can have live mode monitoring on standard output:

inotifywait -m -r -e access -e modify -e create -e delete --format 'PATH:%w%f EVENTS:%,e' {{path_to_monitor}}

Notes:

  • -m: monitor indefinitely
  • -r: recursive monitor
  • -e: specify file system events to be monitored
  • --format: specify the output of the command

Example (command performed on monitored directory followed by realtime inotifywait output):

$ cd {{path_to_monitor}}
$ touch test
PATH:./test EVENTS:CREATE
$ rm test
PATH:./test EVENTS:DELETE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.