gdcloud storage rm

שם

‫gdcloud storage rm – מחיקת אובייקטים בקטגוריה.

SYNOPSIS

gdcloud storage rm [URLS ...]
    [--all-versions, -a]
    [--continue-on-error]
    [--recursive, -r] [flags]

דוגמאות

The following command deletes a single object named 'my-object' from the bucket 'my-bucket':

    gdcloud storage rm s3://my-bucket/my-object

The following command deletes all objects and folders within the bucket 'my-bucket'. This is required when deleting a bucket's entire contents.
Note: For versioned buckets, this command only creates delete markers for the live versions. Previous versions remain. To permanently delete all versions, use --all-versions.

    gdcloud storage rm --recursive s3://my-bucket

The following command permanently deletes all objects and all their historical versions in 'my-bucket':

    gdcloud storage rm --all-versions --recursive s3://my-bucket

The following command deletes all objects and subfolders within the folder 'my-folder':

    gdcloud storage rm --recursive s3://my-bucket/my-folder/

The following command deletes all objects directly inside 'my-folder', but does NOT delete objects in subfolders:

    gdcloud storage rm s3://my-bucket/my-folder/*

The following command deletes all objects directly inside 'my-folder', and objects in all subfolders inside 'my-folder':

    gdcloud storage rm --recursive s3://my-bucket/my-folder/*

The following command deletes all historical versions of all objects directly inside 'my-folder', and of objects in  all subfolders inside 'my-folder':

    gdcloud storage rm --recursive --all-versions s3://my-bucket/my-folder/*

The following command deletes all objects and subfolders inside 'my-folder' (equivalent to --recursive on the folder):

    gdcloud storage rm s3://my-bucket/my-folder/**

The following command deletes all historical versions of 'my-object', permanently removing it. Use this if the bucket has versioning enabled:

    gdcloud storage rm --all-versions s3://my-bucket/my-object

The following command deletes a specific version of 'my-object' using its version ID:

    gdcloud storage rm s3://my-bucket/my-object#VERSION_ID

The following command attempts to delete multiple objects. If one deletion fails (e.g., due to permissions), it proceeds to delete the others instead of stopping immediately:

    gdcloud storage rm --continue-on-error s3://my-bucket/obj1 s3://my-bucket/obj2

דגלים אופציונליים

      --all-versions        Delete all versions of an object.
      --continue-on-error   If any operations are unsuccessful, the command will exit with a non-zero exit status after completing the remaining operations.
      --recursive           Recursively delete the contents of buckets or directories that match the path expression. When this option is used together with a non-recursive wildcard path (e.g. 'bucket/*'), this option takes precedence and recursively deletes contents or directories matching the wildcard path
      --verbosity string    Override the default verbosity for this command. VERBOSITY must be one of: debug, info, warning, error, none. (default "info")

GDCLOUD WIDE FLAGS

הדגלים האלה זמינים לכל הפקודות: --configuration, ‏ --format, ‏ --help, ‏ --project, ‏ --quiet.

מידע נוסף זמין בדף סקירה כללית של מדריך העזר ל-CLI של gcloud.