File access count in Linux

只谈情不闲聊 提交于 2019-12-01 17:31:45

No, it is not stored. That would be a very odd feature.

You can monitor access to a file and count what you need yourself.

  • You can write your own program doing this with inotify. Here is a rather nice introduction.
  • Another option is using Linux audit subsystem. This way you'll set up rules telling the kernel which files are you interrested in, and later you'll be able to check logs to get whichever statistics you need. Here is a short tutorial.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!