Help Center/ Object Storage Service/ Tools Guide/ OBS Browser+/ FAQs/ Can I Query the Number and Size of Files in a Folder?
Updated on 2025-10-30 GMT+08:00

Can I Query the Number and Size of Files in a Folder?

OBS Browser+ does not support this function. You can run the obsutil command for listing objects. In this command, specify the prefix as the directory of the folder to be queried. For details, see Listing Objects in the obsutil guide.

Take Linux OS 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

The -du parameter is only supported by obsutil 5.4.6 and later.