tencent cloud

Listing Incomplete Multipart Uploads - lsparts
Last updated: 2025-05-09 18:27:39
Listing Incomplete Multipart Uploads - lsparts
Last updated: 2025-05-09 18:27:39
The lsparts command is used to list the generated incomplete multipart uploads.
Note:
If you need to use this command to list multipart upload tasks, when you perform authorization policy, set action to cos:PutBucket.
If you need to use this command to list the fragments of the corresponding file of the multipart upload task, when you perform authorization policy, set action to cos:ListMultipartUploads, cos:ListParts.
For more authorizations, please refer to CAM-Enabled API.

Command Syntax

./coscli lsparts cos://<bucket-name>[/prefix/] [flag]
lsparts includes the following parameters:
Parameter Format
Description
Example
cos://<bucket-name>
Specifies the target bucket, which is accessible by using the bucket alias or bucket name configured in the configuration file as detailed in Download and Installation Configuration. If you use the bucket name for access, you also need to include the endpoint flag.
Access with the bucket alias: cos://example-alias
Access with the bucket name: cos://examplebucket-1250000000
/prefix/
Specifies a directory (optional).
/picture/
The lsparts command contains the following optional flags:
Flag Abbreviation
Flag Name
Description
-h
--help
Views the usage of this command.
None
--include
Includes specific objects.
None
--exclude
Excludes files with a specific pattern
None
--limit
Specifies the maximum quantity (0–1000) to be listed.
None
--upload-id
Upload record ID. When uploading the uploadid, you need to specify the specific file. Only show the fragment information of the file corresponding to the uploadid. If the uploadid is not passed in, show the parts being uploaded under the specified prefix.
Note:
For more information, see Multipart Upload.
For other common options of this command (such as switching bucket and user account), see Common Options.

Examples

List All Parts Being Uploaded in bucket1

./coscli lsparts cos://bucket1
The returned information includes the object key (the unique identifier of the object in the bucket), multipart upload ID, multipart upload start time, and total number of incomplete multipart uploads in the bucket. Below is an example:
KEY | UPLOAD ID | INITIATE TIME
---------------+-------------------------------------+----------------------------
test.txt | 1671191183635d2b71b1d68a0********** | 2022-01-01T00:00:00.000Z
---------------+-------------------------------------+----------------------------
TOTAL: 1
----------------------------

Listing All Uploaded Fragments of the test.txt File in bucket1 with upload_id 1671191183635d2b71b1d68a0**********

./coscli lsparts cos://bucket1/test.txt --upload-id="1671191183635d2b71b1d68a0**********"
The returned result is as follows. The output information includes: PARTNUMBER (chunk number), ETAG (MD-5 algorithm checksum of the chunk), LastModified (last modified time of the chunk), SIZE (size of each part).
PARTNUMBER | ETAG | LAST MODIFIED | SIZE
-------------+------------------------------------+---------------------------+------------
1 | "58f06dd588d8ffb3beb46ada6309436b" | 2024-12-17T16:34:48+08:00 | 32.00 MB
2 | "58f06dd588d8ffb3beb46ada6309436b" | 2024-12-17T16:34:48+08:00 | 32.00 MB
3 | "58f06dd588d8ffb3beb46ada6309436b" | 2024-12-17T16:34:48+08:00 | 32.00 MB
4 | "58f06dd588d8ffb3beb46ada6309436b" | 2024-12-17T16:34:48+08:00 | 32.00 MB
-------------+------------------------------------+---------------------------+------------
TOTAL: 4
-------------


Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback