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_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.
rm: missing operand
Try 'rm --help' for more information.

Like I said, the oldest files do actually get deleted, so apparently these messages are harmless, but why do I get them, and is there something I can do to 'fix' the script so I don't?

Thx

Charles

Reply via email to