title: Filtering output of `tree` command
body: <p>I have a directory containing many sub-directories, each with lots of files having different extensions. </p>
  
  <p>Is it possible for me to filter the output of the  <code>tree</code> command so that files having certain extensions like say <code>.log</code> and <code>.msh</code> or certain named directories are not in the output </p>
  
  <p>Consider the example below</p>
  
  <pre><code>    .
      ├── dir1
      │   ├── bar.log
      │   ├── blahblah
      │   │   └── blah.txt
      │   ├── hello.txt
      │   └── test.msh
      ├── foo.log
      ├── out
      ├── test.py
      └── test.txt
  
      2 directories, 8 files
  </code></pre>
  
  <p>I would like to filter <strong>away</strong> certain directories (and obviously <em>their</em> contents) and files having certain extensions. For instance I would like to filter away the contents of directory <code>blahblah</code> and all files having extensions <code>.msh</code> and <code>.log</code></p>
  
  <p>So I would like the output to be </p>
  
  <pre><code>.
  ├── dir1
  │   ├── hello.txt
  ├── out
  ├── test.py
  └── test.txt
  </code></pre>