![]() |
(PHP?) Scan server for rarely used files?
Is there a way to let php sift through all the files on one's server and delete those which haven't been accessed in a year or so?
I have a shitload of gallery html's which just sit there taking up space... |
there's no way to determine what's been accessed. Its possible to do this based on last modified date.
Unless you want it to sift through gigabytes of server logs, in which case php is still not the right language for that |
Quote:
|
On what OS are your files located ?
you can always try to use fileatime() http://ca3.php.net/manual/en/function.fileatime.php |
Doesn't this function do that:
http://www.w3schools.com/php/func_fi..._fileatime.asp ? Or did I misunderstand it? edit Quote:
|
fileatime should work, just use it to check, then loop through the directory and unlink() files that haven't been used in x amount of time.
|
All times are GMT -7. The time now is 03:05 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123