[mythtv] an idea from ruby on rails

Andrei Tanas andrei at tanas.ca
Fri Jan 25 14:56:29 UTC 2008


> # cat mysql_backup_myth
> #!/bin/bash
> cd /var/log/mythtv
> mysqldump -u root --password=my00SQL mythconverg > dump-`date +"%Y%m%d-
> %H%M%S"`-myth.sql
> ls -t dump-*.sql | head -7 | xargs rm

I don't understand this last line - you delete the 7 latest files? Shouldn't
that be "head -n -7" to delete all but the 7 latest?



More information about the mythtv-dev mailing list