Reputation: 1
I currently use AWS S3 to retrieve a whole text file from S3 using the following command:
aws --profile=cloudian --endpoint-url=https://s3-abc.abcstore.abc.net s3 cp s3://abc-store/STORE1/abc2/ABC/test_08.txt test.txt
How can I just get the file size?
Upvotes: 1
Views: 102
Reputation: 12259
If you just want the size, use head object operation.
aws --profile=cloudian --endpoint-url=https://s3-abc.abcstore.abc.net s3api head-object --bucket abc-store --key STORE1/abc2/ABC/test_08.txt --query 'ContentLength'
Upvotes: 2