title | description | services | documentationcenter | author | manager | editor | ms.assetid | ms.custom | ms.service | ms.workload | ms.tgt_pltfrm | ms.devlang | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Azure CLI Script Sample - Calculate blob container size | Microsoft Docs |
Calculate the size of a container in Azure Blob storage by totaling the size of the blobs in the container. |
storage |
na |
tamram |
timlt |
tysonn |
mvc |
storage |
storage |
na |
azurecli |
sample |
06/28/2017 |
tamram |
This script calculates the size of a container in Azure Blob storage by totaling the size of the blobs in the container.
[!INCLUDE sample-cli-install]
[!INCLUDE quickstarts-free-trial-note]
Important
This CLI script provides an estimated size for the container and should not be used for billing calculations.
[!code-azureclimain]
Run the following command to remove the resource group, container, and all related resources.
az group delete --name myResourceGroup
This script uses the following commands to calculate the size of the Blob storage container. Each item in the table links to command-specific documentation.
Command | Notes |
---|---|
az group create | Creates a resource group in which all resources are stored. |
az storage blob upload | Uploads local files to an Azure Blob storage container. |
az storage blob list | Lists the blobs in an Azure Blob storage container. |
For more information on the Azure CLI, see Azure CLI documentation.
Additional storage CLI script samples can be found in the Azure CLI samples for Azure Blob storage.