Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 6
    Looked at the man page, saw a very terse explanation for "-I", was frustrated. Didn't think to look a few lines above. Thanks. ;) Commented Nov 13, 2014 at 9:47
  • How to set filter to get .html files only, nothing else Commented Sep 4, 2015 at 10:23
  • Thanks! I use this to browse my code from the command line with excluding node_modules. Commented Mar 15, 2017 at 15:43
  • 6
    How can a subdirectory such as docs/subdoc/ be excluded? Commented Dec 25, 2017 at 12:39
  • 3
    @JitendraVyas: how about tree --prune -P '*.html' You will also get directories, but only those with .html files in them. Commented Aug 22, 2018 at 14:57