Skip to content

Instantly share code, notes, and snippets.

View MaurerKrisztian's full-sized avatar
🐛
Adding bugs to code.

Maurer Krisztian MaurerKrisztian

🐛
Adding bugs to code.
View GitHub Profile
@MaurerKrisztian
MaurerKrisztian / find_node_module_sizes.sh
Created September 28, 2023 14:43
This script searches for top-level node_modules directories within a specified directory (or the entire filesystem by default). It calculates and displays the size of each found node_modules directory and provides a total size at the end.
#!/bin/bash
# ANSI color codes
RED="\033[31m"
GREEN="\033[32m"
YELLOW="\033[33m"
RESET="\033[0m"
# Set the starting directory for the search. Default is root if no argument is provided.
START_DIR=${1:-/}