gcloud alpha storage objects list URLS [URLS …] [--additional-headers=HEADER=VALUE] [--exhaustive] [--fetch-encrypted-object-hashes] [--metadata-filter=METADATA_FILTER] [--next-page-token=NEXT_PAGE_TOKEN] [--raw] [--soft-deleted] [--stat] [--decryption-keys=[DECRYPTION_KEY,…]] [--filter=EXPRESSION] [--limit=LIMIT] [--page-size=PAGE_SIZE] [--sort-by=[FIELD,…]] [--uri] [GCLOUD_WIDE_FLAG …]
(ALPHA) List Cloud Storage objects.
Bucket URLs like gs://bucket match all the objects inside a bucket,
but gs://b* fails because it matches a list of buckets.
my-bucket within
current directory level:
gcloud alpha storage objects list gs://my-bucketList all objects across nested directories using wildcards (https://cloud.google.com/storage/docs/wildcards):
gcloud alpha storage objects list gs://my-bucket/**List all objects in bucket beginning with ``o´´, including objects across nested directories:
gcloud alpha storage objects list gs://my-bucket/**/o*
List all objects within current directory of bucket with JSON formatting, only
returning the value of the metadata
field:
name
gcloud alpha storage objects list gs://my-bucket --format="json(name)"List only contexts attached to objects as key value pairs.
gcloud alpha storage objects list gs://my-bucket --format=contextsonlyURLS [URLS …]--additional-headers=HEADER=VALUEheader1=value1,header2=value2. Overrides
the default storage/additional_headers property value for this
command invocation.
--exhaustive--fetch-encrypted-object-hashes--metadata-filter=METADATA_FILTERstorage ls and storage du will still
list directories or buckets even if they do not contain any objects matching the
filter. See https://cloud.google.com/storage/docs/listing-objects#filter-by-object-contexts-syntax
for more details.
--next-page-token=NEXT_PAGE_TOKEN--raw--soft-deleted--stat--decryption-keys=[DECRYPTION_KEY,…]--filter=EXPRESSIONEXPRESSION to each resource item
to be listed. If the expression evaluates True, then that item is
listed. For more details and examples of filter expressions, run $ gcloud topic filters. This flag
interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter,
--limit.
--limit=LIMITunlimited. This
flag interacts with other flags that are applied in this order:
--flatten, --sort-by, --filter,
--limit.
--page-size=PAGE_SIZEunlimited (no paging).
Paging may be applied before or after --filter and
--limit depending on the service.
--sort-by=[FIELD,…]--flatten, --sort-by, --filter,
--limit.
--uri--format, the formatting is applied on this URI list. To display
URIs alongside other keys instead, use the uri() transform.
--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud storage objects list
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.