s5cmd icon indicating copy to clipboard operation
s5cmd copied to clipboard

feat: added Head command

Open 4o4x opened this issue 1 year ago • 0 comments

This pull request adds the head command to the program. Closes #682.

The head command is designed to check if a file exists without downloading the object or bucket itself. It retrieves metadata from an object without returning the object itself. This operation is useful for users who are only interested in an object's metadata.

  • Implemented the head command functionality.
  • Added end-point tests to ensure the correctness of the head command implementation.

Usage:

Check if a bucket exists

s5cmd head s3://bucket-name

Check if a file exists and retrieve its metadata

s5cmd head s3://bucket-name/object

4o4x avatar Jul 03 '24 15:07 4o4x