Is there a way to know the last time Apache accessed a file?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Yes, just look in your apache log files. They might be in
/var/log/httpd or /var/log/apache2. It's the access logs
that let you know what pages people have tried to open.
Yes, I know about the Apache access logs..
But they will give me hints about the files that were accessed..
What I'm looking for, are the files that haven't been accessed in a long time..
I'm talking here about thousands of files.. not tins..
What I need to do, is to purge the un-surfed-any-more files.
I guess, access logs will not help in my case, unless if there is some way to do that.
Dose a file-last-access-history usually get effected by Apache reading them?
I'll try to find something about it, I did try with the ls -u, ls -t
But, seems like Apache doesn't write or modify the file access time.. I'm not sure.
Any time a prog accesses a file (reads it), the filesystem updates the file's atime. If the file is modified, the filesystem updates the mtime... This is any prog, not just Apache.
It is possible to mount an FS with -noatime to give a slight boost in performance but that's unusual.
Check the /etc/fstab file entry.
In fact, I did view the /etc/fstab, but I couldn't realize it.
Code:
none /dev/pts devpts rw 0 0
Could you please, let me know what way would this help me?
Also, for the (find) part..
I did several tries.. I could find files, with thier access time, etc..
But, when I let Apache to surf there files, it didn't seem that it changes any thing..!!
How would I know that the system is not -noatime enabled?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.