Temp files under production server root directory/tmp folder

We are seeing thousands of .tmp files in tmp folder under our production server root directory and it shows that they are created by admingroup. They are consuming a lot of disk space. These files all have the naming format of +~JF??????.tmp  where the ???? is some long number like this +~JF8912748238257059916.tmp

What are these files used for? Can we delete them from the tmp folder. Will it affect anything?

Any response is appreciated.

  Discussion posts and replies are publicly visible

Parents
  • In general, no.

    If it's filling up with junk, you may want to look at what software isn't cleaning up after itself.

    You can also use find to identify files which haven't been modified or accessed in a long time that is probably safe to delete.


    Most Linux distros automatically clean out /tmp/ on startup. While this doesn't necessarily help if we're talking about a no-reboots-EVER server here, one possibility might be running find ./ -type f -atime 14 -exec rm {} \; every week or so to delete any plain file that hasn't been accessed at all in the past two weeks..

    You should really look at what is in there before you decide to remove it. Doing a rf -rf * on anything is inherently dangerous.
Reply
  • In general, no.

    If it's filling up with junk, you may want to look at what software isn't cleaning up after itself.

    You can also use find to identify files which haven't been modified or accessed in a long time that is probably safe to delete.


    Most Linux distros automatically clean out /tmp/ on startup. While this doesn't necessarily help if we're talking about a no-reboots-EVER server here, one possibility might be running find ./ -type f -atime 14 -exec rm {} \; every week or so to delete any plain file that hasn't been accessed at all in the past two weeks..

    You should really look at what is in there before you decide to remove it. Doing a rf -rf * on anything is inherently dangerous.
Children
No Data