s5cmd
s5cmd copied to clipboard
feat: added Head command
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