From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: deleting backup files dependant on their age
Date: Wed, 25 Nov 2015 02:26:06 +0100 [thread overview]
Message-ID: <87io4qx429.fsf@debian.uxu> (raw)
In-Reply-To: n30pvc$ai$1@dont-email.me
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
prev parent reply other threads:[~2015-11-25 1:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-23 19:46 deleting backup files dependant on their age Sharon Kimble
2015-11-23 20:14 ` Eli Zaretskii
2015-11-24 0:01 ` Emanuel Berg
2015-11-24 0:58 ` Emanuel Berg
[not found] ` <mailman.585.1448326084.31583.help-gnu-emacs@gnu.org>
2015-11-24 4:46 ` Dan Espen
2015-11-25 1:26 ` Emanuel Berg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87io4qx429.fsf@debian.uxu \
--to=embe8573@student.uu.se \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).