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

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2010-04-23T16:36:55Z Indexed on 2010/04/23 18:03 UTC
Read the original article Hit count: 186

Filed under:
|
|
|

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 to only see directories down to some level.

Similarly, for the command ls, how do I control the level of subdirectories that will be displayed? By default, it will only show the direct subdirectories, but not go further.

© Stack Overflow or respective owner

Related posts about bash

Related posts about tar