Last active
March 13, 2017 03:34
-
-
Save aleung/7efdf54e18bff698b7d06a78c7133583 to your computer and use it in GitHub Desktop.
One line shell scripts
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
# size of immediate sub-folders | |
du -d1 -BM | sort -g |
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
# folder tree , also post at http://stackoverflow.com/a/42663008/94148 | |
# folders only | |
pwd;find . -type d -print 2>/dev/null|awk '!/\.$/ {for (i=1;i<NF-1;i++){printf("│ ")}print "├── "$NF}' FS='/' | |
# include files | |
pwd;find . -print 2>/dev/null|sort|awk '!/\.$/ {for (i=1;i<NF-1;i++){printf("│ ")}print "├── "$NF}' FS='/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment