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) > > It works fine and does what it is supposed to, but the email I get as a > result of the script running says only this in the body: > > rm: missing operand > Try 'rm --help' for more information.
Do you have a file with an odd name in either of those directories, particularly one starting with a - You could try adding "echo rm $(ls -1t ..." to the script to see what it is actually trying to run. Or you could use find instead find $MySQL_BACKUP_DIR_nightly -type f -mtime +60 -exec rm {} + -- Neil Bothwick The trouble with life is that you are halfway through it before you realize it's a "do it yourself" thing.
signature.asc
Description: PGP signature