خرید بک لینک

I need to find all files older than X days and delete them locally and from my s3 bucket. The problem is the find command retus me the full path and filename too. I tried messing with basename and some other things, but could not get it working. Any help would be greatly appreciated.

For now the 'delete them locally' part is ls instead of rm while I was playing around with it. For the rm I need the full path.

I need to strip /home/ec2-user/backups/ out of the s3cmd calls.

$ find /home/ec2-user/backups -type f -mtime +3 -exec ls {} ; -exec s3cmd del s3://kisnardonline/{} ;

/home/ec2-user/backups/FILESYSTEM-2016-04-09_00-00.tar.gz
File s3://kisnardonline//home/ec2-user/backups/FILESYSTEM-2016-04-09_00-00.tar.gz deleted

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 25 فروردين 1395 ساعت: 13:07

صفحه بندی