DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Delete Old Rails Sessions

05.22.2005
| 6346 views |
  • submit to reddit
        
find /tmp/ -name "ruby_sess*" -cmin +60 -exec rm \{} \;
    

Comments

Snippets Manager replied on Tue, 2007/04/10 - 10:43pm

Dear Good sir. You will very seriously remove the first "slash from tmp" otherwise it will Look to your the Root of your server and not the Root of your "rails app". so "do it" like this: find tmp/ -name "ruby_sess*" -cmin +60 -exec rm \{} \; Thank you and trying to not be such a fucking stupid next time. Your friend, Kebab King from Jackson Heights