I am wondering if it's possible to output the contents of a tar.gz file using tree without having to extract the contents of the file to a temp directory then using tree with that directory.
I know we can see the contents of the file without extracting using
tar -tf file.tar.gz
And I have simply tried piping this to the
tar -tf file.tar.gz | tree
But this just outputs the tree of the current directory, not the contents of the file.
A few questions,
- Is this even possible?
- If it is possible, are there any limitations? Depth, number of files, etc?
- Is there an alternative way to see a tree style output of the contents?