From: Ulick Magee on
Pete Puma wrote:>
>
> I did add Gnome and some new repositories for the latest files, etc.

Should make no difference.

> Still, that's a ton of temps. Ya think?

Yes :)

Can you post the output of (as root)

du -s /tmp/*|sort -n|tail -30





--

Ulick Magee

Free software and free formats for free information for free people.
Open Office for Windows/OSX/Linux: http://www.openoffice.org
openSUSE Linux: http://en.opensuse.org
From: Lew Pitcher on
On June 29, 2010 19:08, in alt.os.linux.suse, pete(a)puma.org wrote:

> David Bolt wrote:
>
>> du / --max-depth=1 --one-file-system --exclude=/proc \
>> --exclude=/dev --exclude=/sys | sort -nr
>>
> Thanks for that. And here's what I get out of that (now) 32 gig partition:
>
> 20071072 /
> 13481820 /tmp
[snip]
> I need to learn a better way to eliminate temp files. How do I attack
> these temp files?

Here's what I do...

~ $ ls /etc/cron.hourly/
cleantmp

~ $ cat /etc/cron.hourly/cleantmp
#!/bin/bash
# cleantmp.sh - Remove unused files from tmp directories
#
#--------------------Change Log--------------------
# v1.5 - 2009-11-25 - LP - load defaults from /etc/cleantmp.conf
# v1.4 - 2009-09-05 - LP - test files, sockets on ctime, not atime
# v1.3 - 2009-09-03 - LP - full pathnames to logger and find
# - cd to root before initial logger
# - test symlinks on ctime, not atime
# v1.2 - 2009-09-01 - LP - log pid to syslog
# - change atime values to 1 day
# - make file atime, socket atime, tmp dirs
# configurable through shell variables
# - clean out symbolic links
# v1.1 - 2009-08-30 - LP - added cleanup of abandoned unix socket files
# v1.0 - 2009-08-29 - LP - initial coding
#---------------------------------------------------


# ------------- Default Configuration --------------------
# TMP_DIRS - List of directories to search
# FILE_AGE - # days ago (rounded up) that file was last accessed
# LINK_AGE - # days ago (rounded up) that symlink was last accessed
# SOCK_AGE - # days ago (rounded up) that socket was last accessed

TMP_DIRS="/tmp /var/tmp /usr/src/tmp /mnt/tmp"
FILE_AGE=+1
LINK_AGE=+1
SOCK_AGE=+1

# Override the above defaults with values from the /etc/cleantmp.conf file
[ -f /etc/cleantmp.conf ] && source /etc/cleantmp.conf

#-----------------------------------------------------------------
cd /
/usr/bin/logger "cleantmp.sh[$$] - Begin cleaning tmp directories"

# delete any tmp files that are more than 2 days old
/usr/bin/find $TMP_DIRS \
-depth \
-type f -a -ctime $FILE_AGE \
-print -delete

# delete any old tmp symlinks
/usr/bin/find $TMP_DIRS \
-depth \
-type l -a -ctime $LINK_AGE \
-print -delete

# delete any empty files
/usr/bin/find $TMP_DIRS \
-depth \
-type f -a -empty \
-print -delete

# Delete any old Unix sockets
/usr/bin/find $TMP_DIRS \
-depth \
-type s -a -ctime $SOCK_AGE -a -size 0 \
-print -delete

# delete any empty directories (other than lost+found)
/usr/bin/find $TMP_DIRS \
-depth -mindepth 1 \
-type d -a -empty -a ! -name 'lost+found' \
-print -delete

/usr/bin/logger "cleantmp.sh[$$] - Done cleaning tmp directories"
exit 0

~ $ cat /etc/cleantmp.conf
# /usr/local/sbin/cleantmp.sh Configuration Variables

# TMP_DIRS - List of directories to search
# FILE_AGE - # days ago (rounded up) that file was last accessed
# LINK_AGE - # days ago (rounded up) that symlink was last accessed
# SOCK_AGE - # days ago (rounded up) that socket was last accessed

TMP_DIRS="/tmp /var/tmp /usr/src/tmp /mnt/tmp"
FILE_AGE=+1
LINK_AGE=+1
SOCK_AGE=+1
~ $


--
Lew Pitcher
Master Codewright & JOAT-in-training | Registered Linux User #112576
Me: http://pitcher.digitalfreehold.ca/ | Just Linux: http://justlinux.ca/
---------- Slackware - Because I know what I'm doing. ------


From: Pete Puma on
mjt wrote:

> On Tue, 29 Jun 2010 19:08:24 -0400
> Pete Puma <pete(a)puma.org> wrote:
>
>> I need to learn a better way to eliminate temp files. How do I attack
>> these temp files?
>
> Yast -> System -> /etc/sysconfig Editor
>
> System -> Cron -> ... the first six entries should be of interest,
> especially CLEAR_TMP_DIRS_AT_BOOTUP and TMP_DIRS_TO_CLEAR would
> be a good start for a quick fix.

This method alone brought the partition down to 8.1 gigs.
Great stuff.
I really am overdue to learn cron functions.

Cheers.
From: mjt on
On Tue, 29 Jun 2010 21:16:11 -0400
Pete Puma <pete(a)puma.org> wrote:

> > Yast -> System -> /etc/sysconfig Editor
> >
> > System -> Cron -> ... the first six entries should be of interest,
> > especially CLEAR_TMP_DIRS_AT_BOOTUP and TMP_DIRS_TO_CLEAR would
> > be a good start for a quick fix.
>
> This method alone brought the partition down to 8.1 gigs.
> Great stuff.
> I really am overdue to learn cron functions.

On my system, for the TMP_DIRS_TO_CLEAR entry, I have "/tmp /var/tmp"
As you can see, you can add multiple directories for the entry: simply
put a space or two between the directory paths.

--
Never tell a lie unless it is absolutely convenient.
<<< Remove YOURSHOES to email me >>>

From: Pete Puma on
Ulick Magee wrote:

> Pete Puma wrote:>
>>
>> I did add Gnome and some new repositories for the latest files, etc.
>
> Should make no difference.
>
>> Still, that's a ton of temps. Ya think?
>
> Yes :)
>
> Can you post the output of (as root)
>
> du -s /tmp/*|sort -n|tail -30


vodkagimlet:/home/Pete # du -s /tmp/*|sort -n|tail -30

0 /tmp/virt_1111
4 /tmp/5KN2EV.tmp
4 /tmp/acroread_1000_100
4 /tmp/D5Z0EV.tmp
4 /tmp/gpg-WCfEL2
4 /tmp/orbit-pete
4 /tmp/pulse-zQcQ2QitkO7V
4 /tmp/ssh-dNYlc2293
4 /tmp/T1C9EV.tmp
4 /tmp/virtuoso_XM2865.ini
4 /tmp/virtuoso_XM7081.ini
4 /tmp/virtuoso_XM7092.ini
8 /tmp/ksocket-pete
8 /tmp/subsonic
36 /tmp/hsperfdata_root
108 /tmp/kde-pete


This, since the "big deletion".

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5
Prev: Openoffice
Next: Was I hacked?