logo{ :from => Delhi, :about => everything }


delete rails sessions on linux

Posted in ruby on rails, rails, unix by manik on the May 10th, 2006


By default Rails creates session files under {RAILS_ROOT}/tmp/session
Use this script to remove sessions more than a day old. You may add it to cron to automate.

find . -name “ruby_sess*” -ctime +1 -exec rm -f \{} \;

Tags: ,

`

One Response to 'delete rails sessions on linux'

Subscribe to comments with RSS or TrackBack to 'delete rails sessions on linux'.

  1. Todd said,

    on September 20th, 2007 at 12:24 am

    I got a missing argument error message with the find command above.

    This worked for me:

    find . -name “ruby_sess*” -ctime +1 -exec rm -f {} \;

Leave a Reply