Difference between revisions of "Aws s3 ls"
Jump to navigation
Jump to search
↑ https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html
(21 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
− | https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html | + | <code>[[aws s3 ls]]</code> <ref>https://docs.aws.amazon.com/cli/latest/reference/s3/ls.html</ref> |
Listing all user owned buckets: | Listing all user owned buckets: | ||
Line 8: | Line 8: | ||
* <code>[[aws s3]] ls your_bucket_name</code> | * <code>[[aws s3]] ls your_bucket_name</code> | ||
* <code>aws s3 ls s3://mybucket [[--recursive]]</code> | * <code>aws s3 ls s3://mybucket [[--recursive]]</code> | ||
+ | * <code>[[aws s3 ls --summarize --recursive --human-readable]] s3://your-bucket</code> | ||
+ | * <code>[[aws s3 ls --no-sign-request]]</code> | ||
S3 bucket size: | S3 bucket size: | ||
− | [[aws s3 ls --summarize | + | [[aws s3 ls --summarize --recursive --human-readable]] s3://your_bucket_name |
2013-09-02 21:37:53 10 Bytes a.txt | 2013-09-02 21:37:53 10 Bytes a.txt | ||
2013-09-02 21:37:53 2.9 MiB foo.zip | 2013-09-02 21:37:53 2.9 MiB foo.zip | ||
Line 27: | Line 29: | ||
== Errors == | == Errors == | ||
− | + | {{s3 errors TOC}} | |
− | |||
== Related terms == | == Related terms == | ||
Line 34: | Line 35: | ||
* <code>[[aws s3api get-bucket-versioning]] --bucket YOUR_BUCKET_NAME --output text</code> | * <code>[[aws s3api get-bucket-versioning]] --bucket YOUR_BUCKET_NAME --output text</code> | ||
* <code>[[aws s3api list-buckets]] --output text</code> | * <code>[[aws s3api list-buckets]] --output text</code> | ||
+ | * <code>[[aws s3api get-bucket-tagging]] --bucket your_bucket_name</code> | ||
* <code>[[aws s3api get-bucket-policy --bucket]] YOUR_BUCKET_NAME</code> | * <code>[[aws s3api get-bucket-policy --bucket]] YOUR_BUCKET_NAME</code> | ||
* <code>[[s3cmd du]]</code> | * <code>[[s3cmd du]]</code> | ||
* <code>[[for]] BUCKET_NAME in `[[aws s3 ls]]| awk '{print $3}'`; do echo $BUCKET_NAME; [[aws s3api get-bucket-versioning]] --bucket $BUCKET_NAME --output text; done</code> | * <code>[[for]] BUCKET_NAME in `[[aws s3 ls]]| awk '{print $3}'`; do echo $BUCKET_NAME; [[aws s3api get-bucket-versioning]] --bucket $BUCKET_NAME --output text; done</code> | ||
+ | |||
+ | * <code>aws s3 ls| awk '{print $3}' | parallel "echo {}; aws s3api get-bucket-versioning --bucket {} --output text"</code> | ||
+ | * <code>[[aws iam list-virtual-mfa-devices]]</code> | ||
+ | * [[Boto3: aws_s3_ls]] | ||
+ | * <code>[[awswhoami]]</code> | ||
+ | * <code>[[gsutil ls]]</code> | ||
+ | * <code>[[ibmcloud cos list-buckets]]</code> | ||
+ | * <code>[[s3:ListBucket]]</code> | ||
+ | * <code>[[s3:ListAllMyBuckets]]</code> | ||
== See also == | == See also == |
Latest revision as of 13:19, 12 June 2024
Listing all user owned buckets:
aws s3 ls
Listing bucket content:
aws s3 ls your_bucket_name
aws s3 ls s3://mybucket --recursive
aws s3 ls --summarize --recursive --human-readable s3://your-bucket
aws s3 ls --no-sign-request
S3 bucket size:
aws s3 ls --summarize --recursive --human-readable s3://your_bucket_name 2013-09-02 21:37:53 10 Bytes a.txt 2013-09-02 21:37:53 2.9 MiB foo.zip 2013-09-02 21:32:57 23 Bytes foo/bar/.baz/a 2013-09-02 21:32:58 41 Bytes foo/bar/.baz/b 2013-09-02 21:32:57 281 Bytes foo/bar/.baz/c 2013-09-02 21:32:57 73 Bytes foo/bar/.baz/d 2013-09-02 21:32:57 452 Bytes foo/bar/.baz/e 2013-09-02 21:32:57 896 Bytes foo/bar/.baz/hooks/bar 2013-09-02 21:32:57 189 Bytes foo/bar/.baz/hooks/foo 2013-09-02 21:32:57 398 Bytes z.txt Total Objects: 10 Total Size: 2.9 MiB
Errors[edit]
An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied
An error occurred (InvalidToken) when calling the ListBuckets operation: The provided token is malformed or otherwise invalid.
Error: Failed to get existing workspaces: S3 bucket does not exist.
An error occurred (InvalidBucketName) when calling the ListObjectsV2 operation: The specified bucket is not valid.
Related terms[edit]
aws list all
aws s3api get-bucket-versioning --bucket YOUR_BUCKET_NAME --output text
aws s3api list-buckets --output text
aws s3api get-bucket-tagging --bucket your_bucket_name
aws s3api get-bucket-policy --bucket YOUR_BUCKET_NAME
s3cmd du
for BUCKET_NAME in `aws s3 ls| awk '{print $3}'`; do echo $BUCKET_NAME; aws s3api get-bucket-versioning --bucket $BUCKET_NAME --output text; done
aws s3 ls| awk '{print $3}' | parallel "echo {}; aws s3api get-bucket-versioning --bucket {} --output text"
aws iam list-virtual-mfa-devices
- Boto3: aws_s3_ls
awswhoami
gsutil ls
ibmcloud cos list-buckets
s3:ListBucket
s3:ListAllMyBuckets
See also[edit]
- AWS S3:
aws s3control
.aws s3
[cp | ls
|sync | presing
|mb | rm | rb
] - AWS S3:
s3api
|list-buckets
|get-bucket-website
|get-bucket-policy
|create-bucket
|put-bucket-encryption
|aws s3api put-bucket-policy
|get-bucket-acl
|get-bucket-versioning
|get-bucket-location
|put-bucket-versioning | get-bucket-tagging | head-bucket | put-object-lock-configuration
aws s3control
,aws s3control get-bucket-lifecycle-configuration, aws s3control get-bucket-policy
Advertising: