Stay organized with collections Save and categorize content based on your preferences.
gcloud storage du
[URL
…] [--additional-headers
=HEADER
=VALUE
] [--all-versions
, -a
] [--exclude-name-pattern
=EXCLUDE_NAME_PATTERN
, -e
EXCLUDE_NAME_PATTERN
] [--exclude-name-pattern-file
=EXCLUDE_NAME_PATTERN_FILE
, -X
EXCLUDE_NAME_PATTERN_FILE
] [--readable-sizes
, -r
] [--summarize
, -s
] [--total
, -c
] [--zero-terminator
, -0
] [GCLOUD_WIDE_FLAG …
]
gcloud storage du gs://bucketname
To list the size of each object in the prefix subdirectory:
gcloud storage du gs://bucketname/prefix/*
To print the total number of bytes in a bucket in human-readable form:
gcloud storage du -c gs://bucketname
To see a summary of the total number of bytes in two given buckets:
gcloud storage du -s gs://bucket1 gs://bucket2
To list the size of each object in a bucket with Object Versioning enabled, including noncurrent objects:
gcloud storage du -a gs://bucketname
To list the size of each object in a bucket, except objects that end in ".bak", with each object printed ending in a null byte:
gcloud storage du -e "*.bak" -0 gs://bucketname
To list the size of each bucket in a project and the total size of the project:
gcloud storage du --summarize --readable-sizes --total
URL
…]
header1=value1,header2=value2
. Overrides the default storage/additional_headers
property value for this command invocation.
--all-versions
, -a
--exclude-name-pattern
=EXCLUDE_NAME_PATTERN
, -e
EXCLUDE_NAME_PATTERN
-e "*.o"
excludes any object that ends in ".o". Can be specified multiple times.
--exclude-name-pattern-file
=EXCLUDE_NAME_PATTERN_FILE
, -X
EXCLUDE_NAME_PATTERN_FILE
--readable-sizes
, -r
--summarize
, -s
--total
, -c
--zero-terminator
, -0
--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 alpha storage du
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 2025-05-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-07 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5