All Products
Search
Document Center

Object Storage Service:getallpartsize

Last Updated:Aug 24, 2023

This topic describes how to run the getallpartsize command to obtain the size of each part generated and the total size of all parts in incomplete multipart upload tasks.

Note
  • Sample command lines in this topic are based on the 64-bit Linux system. For other systems, replace ./ossutil64 in the commands with the corresponding binary name. For more information, see ossutil.

  • For more information about multipart upload, see Multipart upload and resumable upload.

Command syntax

./ossutil64 getallpartsize oss://bucketname

bucketname: specifies the name of the bucket that contains parts generated in incomplete multipart upload tasks.

Examples

The following command provides an example on how to list all parts that are generated in incomplete multipart upload tasks in the destination bucket named examplebucket:

./ossutil64 getallpartsize oss://examplebucket

If a similar output is displayed, information such as the number of parts, the total size of all parts, and the upload ID of the multipart upload task is obtained:

PartNumber      UploadId                                Size(Byte)      Path
1               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
2               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
3               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
4               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
5               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt
6               F18A92392DFD4B3FA897C267829FE417        52428800        oss://examplebucket/exampleobject.txt

total part count:6     total part size(MB):300.00
0.142115(s) elapsed

Common options

If you use ossutil to switch to a bucket that is located in another region, add the -e option to the command to specify the endpoint of the region in which the specified bucket is located. If you use ossutil to switch to a bucket that belongs to another Alibaba Cloud account, you can add the -i option to the command to specify the AccessKey ID of the specified account, and add the -k option to the command to specify the AccessKey secret of the specified account.

For example, if you want to query parts generated in incomplete multipart upload tasks in the testbucket bucket owned by another Alibaba Cloud account in the China (Hangzhou) region, run the following command:

./ossutil64 getallpartsize oss://testbucket -e oss-cn-hangzhou.aliyuncs.com -i LTAI4Fw2NbDUCV8zYUzA****  -k 67DLVBkH7EamOjy2W5RVAHUY9H****

For more information about other common options of this command, see Common options.