monitoring file and directory access on linux

时光怂恿深爱的人放手 提交于 2020-01-01 01:44:06

问题


Do you know of any linux program, that would monitor accesses to directories and files in the filesystem? I would like to able to produce some report of how many times certain files were accessed in some period?


回答1:


You probably want inotify-tools. Inotify is part of the linux kernal that triggers events on watched files, directories, or even the contents of entire directories. These tools are command line utilities that tap into the capabilities of inotify and allow you to use them, for example, in your shell scripts.

Specifically, you will probably want to look at inotifywatch




回答2:


Maybe that's what you need: http://www.cyberciti.biz/tips/record-monitor-linux-filesystem-changes-auditing.html



来源:https://stackoverflow.com/questions/4205815/monitoring-file-and-directory-access-on-linux

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!