[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Cleaning out old backup (*~, *.bak) files



I have a lot of *~ and *.bak files in my home directories, including
recent ones, and ones from several years ago.  I'd like to set up a
good system that gets rid of old ones--say, older than a month.  I also
would like them to go to the KDE trash bin.

It turns out that making a good script to do this is not as simple as
it sounds (well, not for me, anyway; I'm new to Bash scripting).  You
can't just mv the files; if you do, they won't show up in the KDE
"trash:/" interface.  You can use kfmclient to move them (like
'kfmclient move foo trash:/'), but that results in a progress box for
each file, and runs at about one file per second.  I ran across a
script by boredhacker (http://dot.kde.org/1105642626/1105722224/,
scroll down near the bottom) that looks like a good start, but it's
taking me some time to work it into a usable system.  I also found
another thread
(http://lists.kde.org/?l=kde-devel&m=110513719006887&w=2), but I
haven't done any more searching to see if that guy's program is
available anywhere.  There's also a decent-looking (although rather
Windowsish) program called KleanSweep (on KDE-Apps), but it has a bug
that prevents it from working at all (on my system, anyway).

Anyway, I'm posting to see what other Debianites do to clean out their
old, unneeded files; what kinds of scripts, etc.  Any general
suggestions?



Reply to: