Skip to content

Instantly share code, notes, and snippets.

@Matrix7867
Created September 13, 2019 07:45
Show Gist options
  • Save Matrix7867/ecccc830a82dd5ac39af42284e6f6c90 to your computer and use it in GitHub Desktop.
Save Matrix7867/ecccc830a82dd5ac39af42284e6f6c90 to your computer and use it in GitHub Desktop.
bash script to upload on S3
#!/bin/bash
logdirect="/dataa/app-service-1.0-SNAPSHOT/"
cd $logdirect
ls | grep ".log.gz" | awk '{print $1}' | head -n -3 | xargs -I {} aws s3 mv {} s3://cass-doc/app-logs/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment