I recently inherited a linux webserver that the previous admin used to basically dump any and everything into. What I would like to do is get a list of all files in the directory sorted by their last accessed time with the intention of wiping out anything that is not being used at all by the company.
I'm assuming I should probably just go back 3 months as the company is very active with their web services so anything that hasn't been touched at all in the past 3 months is most likely dead weight.
I tried using the answers in this: How to recursively find and list the latest modified files in a directory with subdirectories and times?
But it didn't seem to work well.
As a caveat, my linux admin experience is very junior. I am well versed in deployment and configuration but I've never had to do something like this (I mean, this thing is a real mess and it sorely needs it).
I'm not against putting together a PHP script to run it but, again, I'm not that hot with PHP either so I really need some straightforward help here. Ideally, having a script to run that will also have a delete file option would make my day, or even a BASH command sequence that can have rm included if I decide everything it finds is junk.
Thanks in advance for any and all help you can offer, I really appreciate it.