Re: deleting oldest files

2007-07-24 Thread Roger Searle
Hi, thanks to everyone for their replies. Steve Holdoway wrote: Need more coffee. ls -1tr - 1 entry per line, t ime order, r eversed. Sorry, that should be ls -ltr to put them in reverse time order. Of course, you can use ls -lt and head as an alternative (: for the deletes I am

Re: deleting oldest files

2007-07-24 Thread Nick Rout
On Wed, July 25, 2007 12:37 pm, Roger Searle wrote: Hi, thanks to everyone for their replies. Steve Holdoway wrote: Need more coffee. ls -1tr - 1 entry per line, t ime order, r eversed. Sorry, that should be ls -ltr to put them in reverse time order. Of course, you can use ls -lt and

Re: deleting oldest files

2007-07-24 Thread Roger Searle
Nick Rout wrote: On Wed, July 25, 2007 12:37 pm, Roger Searle wrote: Hi, thanks to everyone for their replies. Steve Holdoway wrote: Need more coffee. ls -1tr - 1 entry per line, t ime order, r eversed. Sorry, that should be ls -ltr to put them in reverse time order. Of

Re: deleting oldest files

2007-07-23 Thread Steve Holdoway
Sorry, that should be ls -ltr to put them in reverse time order. Of course, you can use ls -lt and head as an alternative (: Steve On Tue, 24 Jul 2007 09:03:13 +1200 Steve Holdoway [EMAIL PROTECTED] wrote: ls -1r | tail -n xxx | xargs rm -f should do it ( or similar - the tail -n syntax

Re: deleting oldest files

2007-07-23 Thread Steve Holdoway
Need more coffee. ls -1tr - 1 entry per line, t ime order, r eversed. 3rd time lucky? On Tue, 24 Jul 2007 09:04:37 +1200 Steve Holdoway [EMAIL PROTECTED] wrote: Sorry, that should be ls -ltr to put them in reverse time order. Of course, you can use ls -lt and head as an alternative (:

Re: deleting oldest files

2007-07-23 Thread Jim Cheetham
On 24/07/07, Roger Searle [EMAIL PROTECTED] wrote: Hi, I have a bash script that functions very well backing up a bunch of folders on a few machines. Each day's files are unique so after a couple of weeks the drive storing them fills. I have no need to retain the oldest files as they are