tencent cloud

masukan

Deleting Objects - rm

Terakhir diperbarui:2022-05-03 11:01:50

    The rm command is used to delete an object.

    Command Syntax

    ./coscli rm cos://<bucketAlias>[/prefix/] [cos://<bucket-name>[/prefix/]...] [flag]
    
    Note:

    rm includes the following optional flags:

    Flag Abbreviation Flag Full Name Description
    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).
    Note:

    • --include and --exclude support standard regular expression syntax, so you can use them to filter files that meet specific criteria.
    • When using zsh, you may need to add double quotes at both ends of the pattern string.
    ./coscli rm cos://bucket1/example/ -r --include ".*.mp4"
    

    Examples

    Deleting an object

    ./coscli rm cos://bucket1/fig1.png
    

    Deleting all objects in the picture directory

    ./coscli rm cos://bucket1/pictrue/ -r
    
    Hubungi Kami

    Hubungi tim penjualan atau penasihat bisnis kami untuk membantu bisnis Anda.

    Dukungan Teknis

    Buka tiket jika Anda mencari bantuan lebih lanjut. Tiket kami tersedia 7x24.

    Dukungan Telepon 7x24