I've had bad experience with handing "delete file" powers to an automatic script before, so I'll disclaim any warranty ("TO THE EXTENT PERMITTED BY APPLICABLE LAW" as the GPL shouts), but it's pretty straightforward, and works for me: I have it in a cronjob. The tmp folder it cleans up is my default save folder on Firefox, and where I generally download everything. If I want to save anything longer than a week, I find it a place in the rest of my filing system. It's sort of like having a cleaner come around every week: occasionally you go "Garr! Where's that coffee-stained, have torn copy of last month's New Yorker! I was going to eventually get around to reading that!", but mostly your cruft just silently disappears without you noticing a thing.the most useful simple script i have
I write books. My latest is a YA science fiction novel called Homeland (it's the sequel to Little Brother). More books: Rapture of the Nerds (a novel, with Charlie Stross); With a Little Help (short stories); and The Great Big Beautiful Tomorrow (novella and nonfic). I speak all over the place and I tweet and tumble, too.