当前位置: 动力学知识库 > 问答 > 编程问答 >

Fedora 19: Best way to keep /tmp /var/tmp directories clean

问题描述:

Running on Fedora 19, I realized that my /tmp directory is out of space.

Trying to find a solution I got confused.

Most answers state that previous releases of Fedora used tmwatch as cron job, which is not the case in my Fedora 19.

Other ways of accomplishing this might be:

rm -rf /tmp*

or even

find /tmp ...

which are commands that are considered "not accurate" in filtering the files which might be currently useful in order to preserve them.

My question is:

Is there a script to keep /tmp /var/tmp and/or other *tmp directories sane?

网友答案:

In /etc/fstab:

tmpfs /tmp tmpfs rw,seclabel 0 0

This line will put /tmp on tmpfs as it should have been.

分享给朋友:
您可能感兴趣的文章:
随机阅读: