Thumbnails explosion
Par Benoît Dejean le vendredi, 5 septembre 2008, 13:32 - GNOME - Lien permanent
Fri Sep 5 13:02:56 CEST wafl.dir.size.max:warning: Directory /vol/vol0/users/luser/.thumbnails/normal/ reached the maxdirsize limit. Reduce the number of files or use the vol options command to increase this limit.
Huhu. There were actually 2 x 135k files under this users's ~/.thumbnails/normal and .thumbnails/fail directories
This is RHEL 4.5, there's already a bug about it (i can't find it, but i'm subscribed to it).
I can see that ext4 raised it's dirsize limit from 32K to 64k, looks like it's not enough 
Commentaires
The problem is, that many programs doesn't handle the movement or deletion of files and the associated thumbnails in the right way. Many times the thumbnails for not existing files are left. Some time ago i wrote this little ruby script, that clears the thumbnail cache from all thumbnails where no associated file is found. Use it on your own risk
require 'gtk2'
dir = DirENV['HOME' + '/.thumbnails/normal/*.png']
deleted = 0
dir.each do |file|
buf = Gdk::Pixbuf.new file uri = buf.get_option('tEXt::Thumb::URI') if !uri.nil? p uri begin filename = (GLib.filename_from_uri uri)[0] rescue GLib::ConvertError filename = "" end if !File.exist? filename printf ("Loesche #{file} ") File.delete file deleted += 1 end endend
printf " #{deleted} Dateinen beseitigt "
The trunk (2.24) version of gnome-settings-daemon now imposes size and time limits on the thumbnail cache.
http://svn.gnome.org/viewvc/gnome-s...
http://bugzilla.gnome.org/show_bug....
The problem is that some incompetent joker wrote a standard that requires thousands upon thousands of files in one directory. By the time you have that, all benefits from having a cache are surely gone.
I reclaimed over a gig a few weeks ago by deleting my thumbnails.
Of course, I had to do it like this: `rm 0*`, `rm 1*`... etc, because `rm *` said "argument list too long". First time that had happened!
I wrote an small script a while ago to check how much of those files were unused, and also you can find a patch to delete them.
http://blogs.gnome.org/gpoo/2006/08...