Last active
July 27, 2017 13:54
-
-
Save tjunghans/8260b4837533d4353c1dda1b2389ed31 to your computer and use it in GitHub Desktop.
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
# Unix find documentation: https://kb.iu.edu/d/admm | |
# Remove all node_modules that were modified 60 days or earlier (to free up disc space) | |
find ./* -maxdepth 1 -path '*node_modules*' -type d -mtime +60 -exec rm -rf {} \; | |
# Show all directories containing node_modules that were modified 60 days or earlier | |
find ./* -maxdepth 1 -path '*node_modules*' -type d -mtime +60 -print | |
# Run this script where all the checked out projects are. | |
find . -maxdepth 2 -type d -ctime +60 -name node_modules | grep -vE "(node-deploy|node-release|stash-client|kibana-dashboards|package-manager)" | xargs rm -rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment