shell script to erase backups on ubuntu -
i have little script supposed erase backups older 1 month stored in folder. doesn't work. files sql.gz file name example: customer_2015-01-12-09:05.sql.gz
now=$(date --date '1 month ago' + '*%y-%m*.sql.gz') rm -rf /home/path/customer_$now
you have space after +
why not working
now=$(date --date '1 month ago' +'*%y-%m*.sql.gz') rm -rf /home/path/customer_$now
Comments
Post a Comment