All Products
Search
Document Center

Object Storage Service:Search for objects

Last Updated:Mar 20, 2026

When a bucket contains a large number of objects, use prefix search to quickly locate objects and directories without browsing the entire bucket.

How prefix search works

A prefix is a string that matches the beginning of an object name. When you enter a prefix, OSS returns all objects and directories at the current directory level whose names start with that string — similar to filtering files by name in a folder.

Two constraints apply:

  • Case-sensitive: The prefix Example matches ExampleFile.jpg but not exampleFile.jpg.

  • Current level only: Only objects and directories directly in the searched directory are returned. Contents inside subdirectories are not included.

Flat search vs. recursive listing

Prefix search covers only the current directory level. If you need to list all objects across all subdirectory levels, use one of the following approaches instead:

ApproachMethod
APIGetBucket (ListObjects) operation
CLI�PH1� command of ossutil

Limits

ConstraintDetail
Match typePrefix only — matches the beginning of the object name
Case sensitivityCase-sensitive
Prefix charactersCannot contain a forward slash (/)
Search scopeCurrent directory level only (non-recursive)

Search for objects in the OSS console

  1. Log on to the OSS console.

  2. In the left-side navigation pane, click Buckets. On the Buckets page, find and click the target bucket.

  3. In the left-side navigation tree, choose Object Management > Objects.

  4. Search for objects: OSS returns all objects and directories at the current level whose names start with the specified prefix.

    • In the root directory: Enter the prefix in the search box and press Enter, or click the search icon.

    • In a subdirectory: Click the directory name to navigate into it, then enter the prefix in the search box and press Enter, or click the search icon.

Examples

Root directory search

TestBucket contains:

TestBucket/
├── Examplesrcfolder1/
│   ├── test.txt
│   └── abc.jpg
├── Exampledestfolder.png
└── example.txt

Searching with prefix Example returns:

ResultReason
Examplesrcfolder1Name starts with Example
Exampledestfolder.pngName starts with Example

Not returned: example.txt (lowercase e), and files inside Examplesrcfolder1 (outside current level scope).

Subdirectory search

Examplesrcfolder1 contains:

Examplesrcfolder1/
├── Projectfolder/
│   ├── a.txt
│   └── b.txt
├── ProjectA.jpg
├── ProjectB.doc
└── projectC.doc

Searching with prefix Project returns:

ResultReason
ProjectfolderName starts with Project
ProjectA.jpgName starts with Project
ProjectB.docName starts with Project

Not returned: projectC.doc (lowercase p), and files inside Projectfolder (outside current level scope).

Search for objects using ossbrowser

ossbrowser supports the same bucket-level operations as the OSS console. Follow the on-screen instructions in ossbrowser to search for objects. For more information, see Use ossbrowser.

What's next

To recursively list objects across directories, use the GetBucket (ListObjects) API operation or the �PH1� command of ossutil.