[Bug 79943] it should be possible to limit the amount of disk space used by thumbnails (.thumbnails directory)

dE de.techno at gmail.com
Thu Jan 5 18:42:58 GMT 2012


https://bugs.kde.org/show_bug.cgi?id=79943





--- Comment #97 from dE <de techno gmail com>  2012-01-05 18:42:56 ---
I think it's about time this bug should be fixed.

In the mean time, I made a cleanup script for Debian - 

#! /bin/bash
# from /etc/rc.local make this script run.
#Estimate free space from df
temp=$(df | grep --word-regexp /)
temp=$(echo $temp | cut -d ' ' -f4)
# If space is less than 500 MB.....
if [[ $temp -le 512000 ]]
then
    echo "Making free space, cleaning up redundant files....."
    aptitude clean
    cd /home
    DIRs="$(ls -d */ -1)"
    while [[ $DIRs != "" ]]
    do
        cur_dir="$(echo "$DIRs" | head -1)"
        rm -R "$cur_dir".thumbnails/*
        rm -R "$cur_dir".cache/*
        DIRs="$(echo "$DIRs" | grep --line-regexp --invert-match "$cur_dir")"
    done
    echo "Done freeing up."
fi

This'll basically remove /home/*/.thumbnails/* and /home/*/.thumbnails/*

i.e. in each directory inside home it'll remove .thumbnails/* and .cache/*

If you're on another distro, just remove 'aptitude clean'. 

This's intended to be run at startup.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list