Linux: don't use file system cache under a directory
- by GetFree
For a PHP website I'm monitoring, I need to see what files are being used each time the browser makes a request.
I thought of using find . -type f -amin 1.
With that I get all files which were read in the last minute (it's a developing server so only I am using the website).
I took care of removing the noatime attribute from the mounting point.
However there must be something else that's preventing the kernel from reading the actual files on disk because the access time is not being updated when I read a file.
I guess it must be the file-system cache which is retrieving the files from memory.
Is there a way to disable file caching under a specific directory? (public_html in my case)
Also I read somewhere that there is the nobh mounting atributes which apparently disables file caching under that mounting point, but I'm not sure.