I am trying to log the docker stats every minute to a csv file in S3 bucket. The below command is run on putty.
while true; do docker stats --no-stream | aws s3 cp - s3://username/dockerstats/`date -u +"%Y%m%dT%H%M%S.csv"`; sleep 60; done
As it can be seen above, it is creating a new file every minute. I would like to append the docker stats to the same csv file. Can anyone let me know what would be the command to append data to the same file csv file? It would be one csv file per day.