Files and folders

Show a folder as a tree

Print a folder's structure as a tree, handy for docs and for getting your bearings.

Fill these in once
  1. Install tree
    Terminal
    brew install tree
  2. Show two levels, skipping clutter
    Terminal
    tree -L 2 -I 'node_modules|.git' .
  1. Install treeNeeds sudo
    Terminal · Ubuntu / Debian
    sudo apt install -y tree
  2. Show two levels, skipping clutter
    Terminal · Ubuntu / Debian
    tree -L 2 -I 'node_modules|.git' .
  1. Show folders and files
    PowerShell
    tree . /F

    Built into Windows. Leave out /F to show folders only.