--- title: "list tar contents" date: 2021-06-13T08:31:14+02:00 draft: false snippet_types: - tar --- Before putting a tar file somewhere hard to access like S3 Glacier I note what is in it. I create a manifest file. Simply list the file names within: ```shell $ tar tvf example.tar ``` With more automation worked in I came up with this: - list all the tar files using fd (rust find replacment) - list content of each one - pipe that into a file for safe keeping ```shell $ for x in $(fd -e tar) ; do (tar tvf "$x" && echo "\n") ; done > /tmp/example_manifest ```