Created
August 15, 2023 11:31
-
-
Save andyj/e8393f70f75ae0b5130fe434c1785cf4 to your computer and use it in GitHub Desktop.
Graphically represent a directory structure using Find and Sed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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