[newbie] better way to delete unneeded but accumulating backup files, subdirectories?
David Armour
d.f.armour at shaw.ca
Wed Feb 7 03:07:43 UTC 2007
Hello list!
I have some sort of backup sequence that accumulates partial and full
backup files in /var/backup; I initiated the sequence before appreciated
what I was setting up, and far enough back that I have zero recollection
of what I might have used. A couple of months back, after I noticed my
remaining hard drive space disappearing at a rapid rate, (quelle
suprise!) someone here kindly suggested deleting them, and I've been
deleting them more or less bi-weekly ever since using the following
sequence:
open the file browser and a terminal
cd <drag'n'drop subdirectory from list in file browser>
sudo chown me:me * #change owner from root to me!
sudo chmod 777 * #change file properties
rm * #delete those suckers
cd .. #move up one level
rmdir <drag'n'drop subdirectory> # hit UpArrow key 6x to move back
through recent history, followed by BACKSPACE to clear previous
subdirectory...
# repeat ... x28 approximately.
I realize that this more than likely qualifies for some sort of Kludge
Award, but for the time being, I'm happy enough to do this chore
manually in part because of a healthy fear of running commands like "rm
*" unattended in some bash script, and in part because I just seem to do
things that way. But I can imagine the chore-yness increasing to a point
eventually where I'm substantially more keen to let the computer take
care of the chore.
I'm stumped by how I get a bash script to recycle a command history,
however, and assuming A Better Way exists, what form it might take. An
alternate and probably sounder stategy, to track down the originating
backup sequence and modify it so that it asks me to insert a cd for
copying at appropriate intervals, unfortunately remains well beyond my
current abilities.
I'm using an up-to-date Edgy on a more or less generic box. Everything's
cool, otherwise.
Any ideas or recommendations gratefully received.
More information about the ubuntu-users
mailing list