Per the answers here I'm able to list the contents of my tarball in ls format. However, I'd like to be able to list them in tree format, i.e. something like the latter instead of the former:
With tar:
$ tar -tf foo.tar
foo/
foo/baz/
foo/baz/qux/
foo/baz/qux/hisfile.txt
foo/bar/
foo/bar/myfile.txt
foo/bar/yourfile.txt
With tree:
$ tree foo
foo
├── bar
│ ├── myfile.txt
│ └── yourfile.txt
└── baz
└── qux
└── hisfile.txt
Is it possible to do this without extracting the tarball? I'd prefer to have to avoid extracting the tarball due to their size.