A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cloud.google.com/storage/docs/wildcards below:

URI wildcards | Cloud Storage

Skip to main content URI wildcards

Stay organized with collections Save and categorize content based on your preferences.

The Google Cloud CLI supports the use of URI wildcards for files, buckets, and objects. Wildcards allow you to efficiently work with groups of files that match specified naming patterns. This page describes the wildcards that are supported and notes important considerations when using wildcards in commands.

Note: You cannot use the gcloud CLI to perform operations on folders that have wildcards in the folder's name. For example, you cannot use the gcloud CLI to list objects in the folder gs://my-bucket/*my-folder/, which contains the * wildcard. Instead, use the Google Cloud console. Wildcard characters

The gcloud CLI supports the following wildcards:

Character Description * Match zero or more characters within the current directory level. For example, cp gs://my-bucket/abc/d* matches the object abc/def.txt but not the object abc/def/g.txt. In the case of listing commands such as ls, if a trailing * matches a sub-directory in the current directory level, the contents of the sub-directory are also listed. ** Match zero or more characters across directory boundaries. When used as part of a local file path, the ** wildcard should always be immediately preceded by a directory delimiter. For example, my-directory/**.txt is valid, but my-directory/abc** is not. Note: Some command shells expand wildcard matches prior to running the command; however, most shells do not support recursive wildcards (**). You can skip command shell wildcard expansion and instead use gcloud CLI wildcarding support in such shells by single-quoting (on Linux) or double-quoting (on Windows) the argument. For example: gcloud storage cp 'data/**' gs://bucket ? Match a single character. For example gs://bucket/??.txt only matches objects with exactly two characters followed by .txt. [CHARACTERS] Match any of the specified characters. For example, gs://bucket/[aeiou].txt matches objects that contain a single vowel character followed by .txt. [CHARACTER_RANGE] Match any of the range of characters. For example, gs://bucket/[a-e].txt matches objects that contain the letter a, b, c, d, or e followed by .txt.

You can combine wildcards to provide more powerful matches, for example:

gs://*/[a-m]??.j*g

Note that unless your command includes a flag to return noncurrent object versions in the results, these wildcards only match live object versions.

The gcloud CLI supports the same wildcards for both object and file names. Thus, for example:

gcloud storage cp data/abc* gs://bucket

matches all files that start with abc in the data directory of the local file system.

Behavior considerations

There are several cases where using wildcards can result in surprising behavior:

Efficiency considerations

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-02 UTC."],[],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.5