Reputation: 29
When we want to check whether a file is ASCII text file, we can use this command
~$ file some_file_content_unknown
some_file_content_unknown: ASCII text
Is it possible to use file command to check a aws s3 object, something like below (but it's not working)
~$ file s3://bucketa/prefixb/some_file_content_unknown
Upvotes: 0
Views: 47
Reputation: 1322
As already answered file
or other utilities cannot work. A solution could be to use metadata during the upload, so that it can be read with head-object
without having to download the entire object first. Read docs here
Upvotes: 1
Reputation: 270059
The file
command does not know how to access Amazon S3.
You will need to download the object first, the run file
against the downloaded file.
Upvotes: 2