You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to check if object exists without downloading it entirely or applying ls (which requires ListObjects)
It can be implemented using - https://github.com/peak/s5cmd/blob/master/storage/s3.go#L118
Usage can be by having another op or simply --metadata_only flag for cp
Thanks !
The text was updated successfully, but these errors were encountered:
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
```
---------
Co-authored-by: S.Burak Yaşar <[email protected]>
Is it possible to check if object exists without downloading it entirely or applying ls (which requires ListObjects)
It can be implemented using - https://github.com/peak/s5cmd/blob/master/storage/s3.go#L118
Usage can be by having another op or simply --metadata_only flag for cp
Thanks !
The text was updated successfully, but these errors were encountered: