监视Linux上的文件和目录访问 [英] monitoring file and directory access on linux

查看:143
本文介绍了监视Linux上的文件和目录访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您是否知道有任何Linux程序可以监视对文件系统中目录和文件的访问?我希望能够生成一些报告,说明一段时间内某些文件被访问了多少次?

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?

推荐答案

您可能想要 inotify-工具. Inotify是Linux内核的一部分,可触发监视文件,目录甚至整个目录内容的事件.这些工具是命令行实用程序,可利用inotify的功能,并允许您在shell脚本中使用它们.

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.

具体地说,您可能希望查看 inotifywatch

Specifically, you will probably want to look at inotifywatch

这篇关于监视Linux上的文件和目录访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆