#!/bin/bash # Here is a shell script that deletes the node_modules folder from each folder found in the current working directory: # Deletes one level down, no recursion # Run this to allow deletion: # $ chmod +x./delete_node_modules.sh # Run this to delete: # $ ./delete_node_modules.sh for d in */; do # Check if the directory contains a node_modules folder if [ -d "$d/node_modules" ]; then # Delete the node_modules folder rm -rf "$d/node_modules" # Print a message indicating that the folder was deleted echo "Deleted node_modules in $d" fi done