Skip to content

Instantly share code, notes, and snippets.

@aviaryan
Last active November 11, 2019 11:53
Show Gist options
  • Save aviaryan/cd6f638b9c2c92e261994d641679dcb3 to your computer and use it in GitHub Desktop.
Save aviaryan/cd6f638b9c2c92e261994d641679dcb3 to your computer and use it in GitHub Desktop.
listing node modules by size
# ~/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"
@singhpratyush
Copy link

Replace gsort with sort if command not available.

@aviaryan
Copy link
Author

aviaryan commented Nov 11, 2019

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