From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: deleting backup files dependant on their age Date: Wed, 25 Nov 2015 02:26:06 +0100 Message-ID: <87io4qx429.fsf@debian.uxu> References: <874mgcebxk.fsf@skimble.plus.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448414199 32558 80.91.229.3 (25 Nov 2015 01:16:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Nov 2015 01:16:39 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 25 02:16:28 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a1Oh6-0002ZA-3L for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Nov 2015 02:16:24 +0100 Original-Received: from localhost ([::1]:42403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1Oh7-0003ch-LU for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Nov 2015 20:16:25 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1Ogs-0003Vy-SF for help-gnu-emacs@gnu.org; Tue, 24 Nov 2015 20:16:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1Ogn-00049c-Sq for help-gnu-emacs@gnu.org; Tue, 24 Nov 2015 20:16:10 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:43054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1Ogn-000492-N4 for help-gnu-emacs@gnu.org; Tue, 24 Nov 2015 20:16:05 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a1Oge-000204-De for help-gnu-emacs@gnu.org; Wed, 25 Nov 2015 02:15:56 +0100 Original-Received: from nl106-137-244.student.uu.se ([130.243.137.244]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Nov 2015 02:15:56 +0100 Original-Received: from embe8573 by nl106-137-244.student.uu.se with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Nov 2015 02:15:56 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: help-gnu-emacs@gnu.org Original-Lines: 35 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: nl106-137-244.student.uu.se Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:cTkqfSqQq6WkBkscDd+Za0kOhdE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:108210 Archived-At: Dan Espen 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