tencent cloud

Cloud Object Storage

Viewing Contents of an Object - cat

PDF
Focus Mode
Font Size
Last updated: 2025-05-09 18:27:40
The cat command is used to view the contents of an object.
Note:
If you need to use this command, when you perform authorization policy, set action to cos:GetBucket. For more authorizations, please refer to CAM-Enabled API.

Command Syntax

./coscli cat cos://<bucket-name>/<key> [flag]
The cat command includes the following parameters:
Parameter Format
Description
Example
cos://<bucket-name>/<key>
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/test.txt
Access with the bucket name: cos://examplebucket-1250000000/test.txt
The cat command includes the following optional flags:
Flag Abbreviation
Flag Name
Description
-h
--help
Views the usage of this command.

Operation Example

Viewing the contents of the test.txt file in the bucket1 bucket

./coscli cat cos://bucket1/test.txt

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback