angel_30
angel_30

Reputation: 1

Get the size of file from AWS Cloudian Object Store

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

Answers (1)

jellycsc
jellycsc

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

Related Questions