Created
June 9, 2014 04:08
-
-
Save dukeofgaming/972288f2d997bacdc130 to your computer and use it in GitHub Desktop.
Directory Tree when there is no tree command
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
find . -type d -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<NF;i++){d=length($i);if ( d < 5 && i != 1 )d=5;printf("%"d"s","|")}print "---"$NF}' FS='/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
it really works
my i ask you why did you put '!/.$/ ?