I would like to see the tree of a big compressed file (specifically only the second level of directories) so I used the following command:
tar -tf tarfile | tree -L 2
But it outputs the tree of the directory I am in, not of the compressed file. The other commands work fine, for example if I do:
tar -tf tarfile | less
It lets me explore correctly the tarfile.
Am I doing something wrong or I can't use
tree like other commands trough pipping? If not, is there any other way to only see the files till second level directories of a compressed file?