what can be deleted safely in /tmp?
Hi people My /tmp directory is growing, but I have no idea what all the files and folders in it are for. On Win I just deleted the whole contents of the temp-directory from time to time. But here I have a lot of of stuff I don't know if I destroy something when I delete it, like folders beginning with "ssh-..." or "ksocket-...", "gconfd-...", YaST2-...", "gpg-..." etc., files of type "socket", PDF-Docs, simple text... Some of them are owned by root, others by me as a user. As it's the /tmp directory I tend to think that this data was only used temporarily and could be deleted, at least everything from the time before the last boot - but as a non-insider of all the Linux-secrets I prefer to ask you, what I can delete safely and where I'd better keep my hands off before I ruin my super running SUSE 10.0 ;-) thanks for your help. Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com special interest site: http://www.bauer-nudes.com
On Tue, 2006-03-07 at 13:30 +0100, Daniel Bauer wrote:
Hi people
My /tmp directory is growing, but I have no idea what all the files and folders in it are for.
On Win I just deleted the whole contents of the temp-directory from time to time. But here I have a lot of of stuff I don't know if I destroy something when I delete it, like folders beginning with "ssh-..." or "ksocket-...", "gconfd-...", YaST2-...", "gpg-..." etc., files of type "socket", PDF-Docs, simple text...
Some of them are owned by root, others by me as a user.
As it's the /tmp directory I tend to think that this data was only used temporarily and could be deleted, at least everything from the time before the last boot - but as a non-insider of all the Linux-secrets I prefer to ask you, what I can delete safely and where I'd better keep my hands off before I ruin my super running SUSE 10.0 ;-)
thanks for your help.
The only safe way to do so manually is by booting the rescue CD/DVD, mount the partition that contains the tmp dir and delete everything there. Be careful of where you are at before deleting anything. The other way is to edit /etc/sysconfig/cron and change the setting for cleaning tmp dirs. # cron.daily can check for old files in tmp-dirs. It will delete all #files not accessed for more than MAX_DAYS_IN_TMP. If MAX_DAYS_IN_TMP is #not set or set to 0, this feature will be disabled. # MAX_DAYS_IN_TMP="30" I have mine set to 30 days. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998
Daniel Bauer wrote:
As it's the /tmp directory I tend to think that this data was only used temporarily and could be deleted, at least everything from the time before the last boot - but as a non-insider of all the Linux-secrets I prefer to ask you, what I can delete safely and where I'd better keep my hands off before
You can delete everything there. Just do it in single user mode. Mark
Am Dienstag, 7. März 2006 14:01 schrieb Ken Schneider:
The other way is to edit /etc/sysconfig/cron and change the setting for cleaning tmp dirs.
# cron.daily can check for old files in tmp-dirs. It will delete all #files not accessed for more than MAX_DAYS_IN_TMP. If MAX_DAYS_IN_TMP is #not set or set to 0, this feature will be disabled. # MAX_DAYS_IN_TMP="30"
I have mine set to 30 days.
Thank you, Ken. I've changed MAX_DAYS_IN_TMP in /etc/sysconfig/cron from "0" to "30" and will see what happens... (this is al very new to me) Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com special interest site: http://www.bauer-nudes.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2006-03-07 at 08:01 -0500, Ken Schneider wrote:
The only safe way to do so manually is by booting the rescue CD/DVD, mount the partition that contains the tmp dir and delete everything there.
Not really... you can delete anything belonging to a user that is not logged in, or who hasn't any process belonging to him running. Doing so at runlevel 1, as Mark said, is pretty safe. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEDc9QtTMYHG2NR9URAoGgAJ96W0FYcK7xOh1wNiBlGat6vVBjsACcDRgC JFyaqJhwb056x+g7jxekJyM= =tz07 -----END PGP SIGNATURE-----
Daniel Bauer wrote:
As it's the /tmp directory I tend to think that this data was only used temporarily and could be deleted, at least everything from the time before the last boot - but as a non-insider of all the Linux-secrets I prefer to ask you, what I can delete safely and where I'd better keep my hands off before I ruin my super running SUSE 10.0 ;-)
You can configure Yast, to automagically delete old stuff from /tmp.
participants (5)
-
Carlos E. R.
-
Daniel Bauer
-
James Knott
-
Ken Schneider
-
Mark Hounschell