Help Center/Object Storage Service/FAQs/Buckets and Objects/How Do I Query the Size of a Folder in a Bucket?
Updated on 2024-10-15 GMT+08:00
How Do I Query the Size of a Folder in a Bucket?
Run the object list command with obsutil. In this command, specify the prefix to the name of the folder to be queried.
Take Linux as an example. Run the ./obsutil ls obs://bucket-test/test/ -du -limit=0 command to query the size of the test folder in bucket bucket-test.
./obsutil ls obs://bucket-test/test/ -du -limit=0 Start at 2023-03-16 06:40:18.2773873 +0000 UTC Listing objects . Remove the -du parameter to view more information [DU] Total prefix [test/] size: 990.85MB

Only obsutil 5.4.6 and later support -du and earlier versions can only use -limit=0, so the latest version of obsutil is recommended.
Parent topic:Buckets and Objects
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot
