Lordo wrote: > Thanks guys. I delete 500 by 500 now and it takes like 20 seconds only. I > am > using the manual select where in method. It is great. > > Now for the files, OK I will use a cron. But can I change the way I get > the > file names? I mean instead of deleting the photo that is related to a > deleted member, can I delete photos that were last accessed a year ago? Sure. Every Linux file has a file times recorded when it was last accessed, and last had *anything* including permissions etc modified, and when it was originally created. But this might be real dangerous. Somebody might have a photo they want to keep that you are about to nuke... Also be sure to read the caveat in the docs about system where fileatime is NOT getting changed for performance reasons. http://php.net/fileatime You'd probably be better off to nuke the photos of the deleted users, and then see where you really stand with out-dated/unused photos. Might be a lot less than you think. Another option is to write a shell script (or PHP) to find really HUGE photos that goofballs have uploaded, or users who have *waaaay* too many photos, and harass them individually. It's usually the case that one or two users are clogging up 90% of your resources when you start digging into this stuff. :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php