Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyj/e8393f70f75ae0b5130fe434c1785cf4 to your computer and use it in GitHub Desktop.
Save andyj/e8393f70f75ae0b5130fe434c1785cf4 to your computer and use it in GitHub Desktop.
Graphically represent a directory structure using Find and Sed
#!/bin/bash
# Use FIND over TREE when you want to exclude folders like node_modules
find /path/to/folder -type d -name "node_modules" -prune -o -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment