1 |
Hi all, |
2 |
|
3 |
I've got a cron job that runs a mysqldump script, and the last part of |
4 |
that script removes the oldest of the files in the backup_dir. |
5 |
|
6 |
The pertinent part of the script is: |
7 |
|
8 |
> # delete aged backup files, keeping 60 nightlies and 45 (5 days of) hourlies |
9 |
> rm $(ls -1t $MySQL_BACKUP_DIR_nightly/* | tail -n +61) |
10 |
> rm $(ls -1t $MySQL_BACKUP_DIR_hourly/* | tail -n +46) |
11 |
|
12 |
It works fine and does what it is supposed to, but the email I get as a |
13 |
result of the script running says only this in the body: |
14 |
|
15 |
rm: missing operand |
16 |
Try 'rm --help' for more information. |
17 |
rm: missing operand |
18 |
Try 'rm --help' for more information. |
19 |
|
20 |
Like I said, the oldest files do actually get deleted, so apparently |
21 |
these messages are harmless, but why do I get them, and is there |
22 |
something I can do to 'fix' the script so I don't? |
23 |
|
24 |
Thx |
25 |
|
26 |
Charles |