A curated collection of production-ready shell scripts. Each script includes detailed documentation, usage examples, and customization options. All scripts are tested on Linux and most work on macOS/BSD.
System Administration
Disk Space Alert Script
Monitor disk usage and send alerts when thresholds are exceeded. Configurable thresholds and email notifications.
System Health Check Script
Comprehensive system health monitoring script checking CPU, memory, disk, services, and network connectivity.
User Management Script
Streamline user creation, modification, and deletion with proper permissions, SSH keys, and sudo access.
Cron Job Wrapper
Wrapper for cron jobs with logging and error handling.
Update Checker Script
Check for available system updates.
File Operations
Bulk File Rename Script
Rename multiple files using patterns, regex, or sequential numbering. Safe preview mode included.
Find Duplicate Files Script
Identify duplicate files by content hash (MD5/SHA256). Options to delete, move, or create hard links.
Organize Downloads Script
Sort files by type into categorized folders.
Directory Sync Script
Synchronize directories using rsync.
Temp File Cleaner
Clean temporary files to reclaim disk space.
Networking
Simple Port Scanner
Lightweight port scanner using bash with /dev/tcp.
SSL Certificate Checker
Check SSL certificate expiration dates for domains.
Network Diagnostic Script
Comprehensive network diagnostics with connectivity and DNS tests.
Security
SSH Hardening Script
Automatically harden SSH configuration with best security practices. Disables root login, changes port, and more.
Firewall Setup Script
Configure basic iptables firewall rules.
Secure Password Generator
Generate cryptographically secure passwords.
File Integrity Checker
Monitor critical files for changes using checksums.
Backup & Recovery
Backup with Rotation Script
Create timestamped backups with automatic rotation. Keep daily, weekly, and monthly backups efficiently.
Database Backup Script
Backup MySQL/MariaDB and PostgreSQL databases with compression, rotation, and optional remote sync.
Remote Backup Script
Encrypted backup to remote server.
ZFS Snapshot Manager
Create and rotate ZFS snapshots.
Monitoring
Service Monitor Script
Monitor services and auto-restart on failure.
Process Watcher Script
Monitor processes for high CPU/memory usage.
Log Rotation Script
Custom log rotation with compression.
Text Processing
Development
Git Repository Cleanup
Clean up Git repositories: prune branches, remove untracked files, optimize repo size.
Docker Cleanup Script
Clean unused Docker resources.
Deployment Script
Automated Git pull, build, and service restart.
Version Bump Script
Bump semantic version in package.json.
Using These Scripts
- 1.Review - Always read and understand the script first
- 2.Test - Run with --dry-run or on a test system
- 3.Customize - Adjust configuration variables for your needs
- 4.Permissions - chmod +x script.sh before running
- 5.Cron - Use absolute paths when scheduling
- 6.Logging - Redirect output for cron jobs: 2>&1