Help Center/ Object Storage Service/ Tools Guide/ obsutil/ FAQ/ Can I Check Whether an Object Exists?
Updated on 2026-09-20 GMT+08:00
Can I Check Whether an Object Exists?
Yes. You can run the stat command to check whether an object exists.
obsutil stat obs://bucket/key
- If the object exists, the object attributes, such as LastModified, Size, StorageClass, and ETag, are returned.
- If the object does not exist, error code 404 is returned.
If the object exists and error code 403 is returned, you may have insufficient permissions. In this case, resolve the permission issue first by referring to Access Control.
Parent topic: FAQ
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot