Listing the content of a tar file or a directory only down to some level

前端 未结 5 1721
鱼传尺愫
鱼传尺愫 2020-12-12 15:38

I wonder how to list the content of a tar file only down to some level?

I understand tar tvf mytar.tar will list all files, but sometimes I would like

5条回答
  •  抹茶落季
    2020-12-12 16:17

    Another option is archivemount. You mount it, and cd into it. Then you can do anything with it just as with other filesystem.

    $ archivemount /path/to/files.tgz /path/to/mnt/folder
    

    It seems faster than the tar method.

提交回复
热议问题