Last active
November 11, 2019 11:53
-
-
Save aviaryan/cd6f638b9c2c92e261994d641679dcb3 to your computer and use it in GitHub Desktop.
listing node modules by size
This file contains hidden or 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
| # ~/github | |
| # ~/freelance | |
| # ~/dev | |
| # are directories with code projects | |
| alias lsnodemodules="find ~/github ~/freelance ~/dev -type d -name 'node_modules' -prune -print0 | xargs -0 du -sh | sort -rh" |
Author
Replace gsort with sort if command not available.
Author
Updated to use sort instead of gsort. Thanks @singhpratyush.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The 2nd revision fixes the issue with whitespace in directory names.