Welcome Guest | Login

deleting stale sessions - but not all sessions ?

I believe rake tmp:sessions:clear will clear out all my sessions - and that is what I want to do. However, I think I would rather clear out only the "stale" sessions - like those that haven't been touched for 12 hours. I believe a command like this would work

find /tmp/ -name 'ruby_sess*' -mmin +720 -delete

would do this. However, when I try,I get an "Operation not permitted" message

How can I accomplish this ?

2008-08-07 10:33 AM

Hi Tracey,

Please give a try as following:

$ cd /home/username/rails_app/

$ find tmp/ -name 'ruby_sess*' -mmin +720 -delete

By giving /tmp the find command will try to remove files from the tmp directory which is under root.

2008-08-07 11:09 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!