All Products
Search
Document Center

Object Storage Service:listpart

Last Updated:Aug 24, 2023

This topic describes how to run the listpart command to list parts in an object that are generated in a multipart upload task that is not completed.

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.

Command syntax

./ossutil64 listpart oss://bucketname/objectname uploadid

The following table describes the parameters that you can configure when you run the listpart command.

Parameter

Description

bucketname

The name of the bucket to which you want to upload the object by using multipart upload.

objectname

The name of the object for which the multipart upload task is not completed.

uploadid

The Object Storage Service (OSS) server returns a globally unique upload ID for the InitiateMultipartUpload operation. You can use the upload ID to uniquely identify the multipart upload task. You can also use an upload ID to cancel or query a multipart upload task.

Important

To obtain the name of the object for which the multipart upload task is not completed, the time when the multipart upload task was initiated, and the upload ID of the multipart upload task, you can specify the -m option in the ls command. For more information, see ls.

Examples

You can run the following command to list the parts in the exampleobject.txt object of the examplebucket bucket that are generated when the multipart upload task is not completed:

./ossutil64 listpart oss://examplebucket/exampleobject.txt 89A46B10E94A4ED5A7E9869F9409****

If a similar output is displayed, information such as the number of parts in the exampleobject.txt object, ETag values, and part size is obtained.

PartNumber      Etag                                    Size(Byte)      LastModifyTime
2               "BD106FED29B349A635BE289746DB****"      4443891         2021-07-21 09:01:33
3               "25DA5C7BB933DBD732B6C11111EB****"      4443891         2021-07-21 09:01:31
4               "AFDA91A8D4F476BAC972306873A3****"      4443891         2021-07-21 09:01:31
11              "2FFEE8D5049AB059D7EC801927BB****"      4443891         2021-07-21 09:01:32

total part count:4      total part size(MB):16.95


0.101978(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, you can run the following command to query the information about the parts in testobject.txt that are generated when the multipart upload task is not completed. The testobject.txt object is in the testbucket bucket that is located in the China (Hangzhou) region and owned by another Alibaba Cloud account.

./ossutil64 listpart oss://testbucket/testobject.txt 46C56B10E94A4ED6G8U9869F9409**** -e oss-cn-hangzhou.aliyuncs.com -i LTAI4Fw2NbDUCV8zYUzA****  -k 67DLVBkH7EamOjy2W5RVAHUY9H****

For more information about other common options that you can use for the listpart command, see Common options.