help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: deleting backup files dependant on their age


From: Emanuel Berg
Subject: Re: deleting backup files dependant on their age
Date: Wed, 25 Nov 2015 02:26:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Dan Espen <despen@verizon.net> writes:

>> If you want to try find(1), I "found" this site,
>> and if I modified it correctly for your purposes it
>> should be: find ~/.emacs.d/backups/.*~ -mtime +14
>> -exec rm {} \;
>
> That doesn't work for me.
>
> Try this:
>
> find ~/.emacs.d/backups -name '*~' -mtime +14 -exec rm
> {} \;

Indeed, it doesn't work for me either :)

To the OP, you can either put that in a shell function
(in .bashrc or .zshrc etc.) and then invoke it once in
a while, or you can semi-automatize it by putting it
in a startup file, e.g. .xinitrc if you use
X (likely). If so, use the actual command, not the
shell function as that might be invisible from
.xinitrc - actually, I don't remember, but 'find' is
available, for sure, as it is a binary: /usr/bin/find.
(You might still want the shell function as that
facilitates getting the command to work.)

There are more refined ways to automatize things but
it is overkill in this case I would say.
Actually removing the backups all all is "a little"
overkill :)

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

[Prev in Thread] Current Thread [Next in Thread]