We have a bunch of different applications running on a web server and some of them started falling over; Quickly checking disk space we realised the tmp folder on a seperate partition had become full - Looking through there's lots and lots of CGI*****-* files, where '' is a number and the last '' are 2 or 3.

I realise files in the temp directory aren't gaurenteed any permanent life so I could just delete them, but I wanted to check first - before I cause even more trouble :-p

I suspect they're related to Ruby on Rails and file uploads.

Cheers, Chris


In theory you should be safe to remove anything in /tmp that is not currently in use, though to be safe I would leave anything less than a day or so old just in case. If you were to reboot this would probably happen automatically, as most modern distributions clear out /tmp (except very recent files) on startup.

You could set a cron job to delete files that are not recent from /tmp periodically, though it would be advisable to confirm where the files are coming from and try stop this happening again in future rather than just treating the symptom.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.