Re: [gentoo-user] "rm: missing operand" in emailed result of cron job that uses rm to remove aged files

2014-01-20 Thread Alan McKinnon
On 01/20/14 14:37, Tanstaafl wrote: > On 2014-01-20 6:51 AM, Neil Bothwick wrote: >> On Mon, 20 Jan 2014 06:38:40 -0500, Tanstaafl wrote: >> >>> The pertinent part of the script is: >>> # delete aged backup files, keeping 60 nightlies and 45 (5 days of) hourlies rm $(ls -1t $MySQL_BACKUP

Re: [gentoo-user] "rm: missing operand" in emailed result of cron job that uses rm to remove aged files

2014-01-20 Thread Alan McKinnon
On 01/20/14 14:37, Tanstaafl wrote: > On 2014-01-20 6:51 AM, Neil Bothwick wrote: >> On Mon, 20 Jan 2014 06:38:40 -0500, Tanstaafl wrote: >> >>> The pertinent part of the script is: >>> # delete aged backup files, keeping 60 nightlies and 45 (5 days of) hourlies rm $(ls -1t $MySQL_BACKUP

Re: [gentoo-user] "rm: missing operand" in emailed result of cron job that uses rm to remove aged files

2014-01-20 Thread Tanstaafl
On 2014-01-20 6:51 AM, Neil Bothwick wrote: On Mon, 20 Jan 2014 06:38:40 -0500, Tanstaafl wrote: The pertinent part of the script is: # delete aged backup files, keeping 60 nightlies and 45 (5 days of) hourlies rm $(ls -1t $MySQL_BACKUP_DIR_nightly/* | tail -n +61) rm $(ls -1t $MySQL_BACKUP_

Re: [gentoo-user] "rm: missing operand" in emailed result of cron job that uses rm to remove aged files

2014-01-20 Thread Neil Bothwick
On Mon, 20 Jan 2014 06:38:40 -0500, Tanstaafl wrote: > The pertinent part of the script is: > > > # delete aged backup files, keeping 60 nightlies and 45 (5 days of) > > hourlies rm $(ls -1t $MySQL_BACKUP_DIR_nightly/* | tail -n +61) > > rm $(ls -1t $MySQL_BACKUP_DIR_hourly/* | tail -n +46) >

[gentoo-user] "rm: missing operand" in emailed result of cron job that uses rm to remove aged files

2014-01-20 Thread Tanstaafl
Hi all, I've got a cron job that runs a mysqldump script, and the last part of that script removes the oldest of the files in the backup_dir. The pertinent part of the script is: # delete aged backup files, keeping 60 nightlies and 45 (5 days of) hourlies rm $(ls -1t $MySQL_BACKUP_DIR_nightl