Forrest logo
back to the s3cmd tool

s3cmd:tldr:89707

s3cmd: Delete a specific object.
$ s3cmd rm s3://${bucket}/${object}
try on your machine

The command s3cmd rm s3://${bucket}/${object} is used to remove or delete an object from an Amazon S3 bucket using the s3cmd command-line tool.

Here's a breakdown of the command syntax:

  • s3cmd: It is the command-line tool used to interact with Amazon S3. It needs to be installed and configured with AWS credentials before running this command.
  • rm: It is the action/command that specifies the removal or deletion of an object from the S3 bucket.
  • s3://${bucket}/${object}: It is the URL format used to identify the object that needs to be deleted. ${bucket} refers to the name of the bucket, and ${object} refers to the name or key of the object within that bucket.

To use this command, you need to replace ${bucket} with the actual name of your bucket and ${object} with the name or key of the object you want to delete from the bucket.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the s3cmd tool