Last active
April 10, 2021 16:19
-
-
Save KRostyslav/7f03719dc8964784c4d9c5d01e085a02 to your computer and use it in GitHub Desktop.
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
# ================================= | |
# List all node_modules | |
# Linux. | |
$ cd documents | |
$ find . -name "node_modules" -type d -prune -print | xargs du -chs | |
# Windows | |
$ cd documents | |
$ FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" echo %d" | |
# ================================= | |
# Delete all node_modules | |
# Linux. | |
$ cd documents | |
$ find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \; | |
# Windows | |
$ cd documents | |
$ FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rm -rf "%d" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment