From mboxrd@z Thu Jan 1 00:00:00 1970 From: bwalton@artsci.utoronto.ca (Ben Walton) Date: Tue, 07 Jul 2009 12:10:42 -0400 Subject: [sup-talk] Backups ? In-Reply-To: <20090707112635.14736pk1mxi8r9k4@webmail.seas.upenn.edu> References: <20090707130844.GA23073@gmx.de> <20090707112635.14736pk1mxi8r9k4@webmail.seas.upenn.edu> Message-ID: <1246982848-sup-5820@ntdws12.chass.utoronto.ca> Excerpts from wagnerdm's message of Tue Jul 07 11:26:35 -0400 2009: > > ls -1t "$dump_dir"/sup-dumps-* | { read; read; read; read; cat } | xargs rm > > "{ read; read; read; read; cat }" could probably better be done as > "tail +5"; makes it easier to adjust to people's choice of backup Or: DAYS=5 find $dump_dir -mtime +${DAYS} -name "*sup-dumps-*" -print0 | xargs -0 --no-run-if-empty rm (adjust xargs options to suit your environment...I don't think --no-run-if-empty is all that portable.) -Ben -- Ben Walton Systems Programmer - CHASS University of Toronto C:416.407.5610 | W:416.978.4302 GPG Key Id: 8E89F6D2; Key Server: pgp.mit.edu Contact me to arrange for a CAcert assurance meeting. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available URL: