rm
command is used to delete an object../coscli rm cos://<bucket-name>[/prefix/] [flag]
rm
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/ |
rm
includes 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 specific objects. |
-r | --recursive | Specifies whether to traverse all objects in the directory recursively. |
-f | --force | Forces deletion (no prompt before the deletion). |
--include
and --exclude
support standard regular expression syntax, so you can use them to filter out objects that meet specific criteria.zsh
, you may need to add double quotes at both ends of the pattern
string.``
./coscli rm cos://bucket1/example/ -r --include ".*.mp4"``
>- For more general options for this command (such as switching buckets or user accounts), see Common Options../coscli rm cos://bucket1/fig1.png
picture
directory./coscli rm cos://bucket1/pictrue/ -r
Apakah halaman ini membantu?