4

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

1
  • Now I changed the title, as I'm interested about the process, not to shop anything. Commented May 7, 2016 at 19:05

1 Answer 1

9

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .