Skip to content

Instantly share code, notes, and snippets.

@arsho
Last active March 30, 2020 17:26
Show Gist options
  • Save arsho/fdd44d314e22d377beab7e39c12e9a05 to your computer and use it in GitHub Desktop.
Save arsho/fdd44d314e22d377beab7e39c12e9a05 to your computer and use it in GitHub Desktop.
Use tree viewer in Ubuntu 16.04 LTS
  • Install tree tool from terminal:
    sudo apt-get install tree
    
  • Go to the desired directory and put tree command:
    tree
    
  • Skip directories or files from lising by using -I 'pattern'
    tree -I 'venv|screenshots|req*|__*'
    
  • Limit number of levels -L NUMBER_OF_LEVELS
    tree -L 2
    
  • To remove colors from output use -n option
    tree -I "venv|__pycache__|screenshots|db.sqlite3" -n
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment