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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -