Skip to content

Instantly share code, notes, and snippets.

@hassantauqeer
Last active January 26, 2020 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hassantauqeer/aca48e4c99d69b492b59bf14c84de900 to your computer and use it in GitHub Desktop.
Save hassantauqeer/aca48e4c99d69b492b59bf14c84de900 to your computer and use it in GitHub Desktop.
Delete a specific directory from all the subdirectories to a given maxDepth.
# This comman will delete all node_modules dirs from the directory it is execteud in till searching to 3rd subsircetory because of maxDepth=3.
find . -maxdepth 3 -name node_modules -type d -exec rm -rf {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment