Skip to main content

mv

The aws s3 mv command is used to move or rename files and directories within Amazon S3 or between the local filesystem and S3. This command is similar to the standard Unix mv command and is useful for organizing and managing files in AWS cloud storage.

Syntax

aws s3 mv /path/to/file s3://destinationbucket/destinationobject

Options

  • source: s3://bucketname/dest/to/object || /path/to/local/file: The source file or directory.
  • destination: s3://bucketname/dest/to/object || /path/to/local/file: The destination where the file or directory will be moved.

  • --recursive: Move directories and their contents to a new location.

See also the original AWS documentation.