“head” command for aws s3 to view file contents

前端 未结 8 1430
不知归路
不知归路 2021-02-06 22:44

On Linux, we generally use the head/tail commands to preview the contents of a file. It helps in viewing a part of the file (to inspect the format for instance), rather than ope

8条回答
  •  耶瑟儿~
    2021-02-06 23:39

    One thing you could do is cp the object to stout and then pipe it to head:

    aws s3 cp s3://path/to/my/object - | head
    

    You get a broken pipe error at the end but it works.

提交回复
热议问题