A collection of battle-tested shell scripts built and refined over 7 years of Unix/Linux system administration. Covers disk management, network diagnostics, system monitoring, backup automation, and user management.
| Directory | Description |
|---|---|
disk/ |
Disk usage reporting and log cleanup automation |
network/ |
Connectivity checks and internal port scanning |
monitoring/ |
System health checks and process watchdog |
backup/ |
Incremental rsync backups and status reporting |
user_management/ |
Bulk user provisioning from CSV |
All scripts follow the same convention:
chmod +x script_name.sh
./script_name.sh --helpTested on: RHEL 7/8/9, CentOS 7/8, Ubuntu 18.04/20.04/22.04
- Bash 4.0+
- Standard GNU coreutils
rsync(backup scripts)- Root or sudo access (user management scripts)
disk_usage_report.sh— Generates disk usage report with configurable alert thresholdscleanup_old_logs.sh— Safely removes logs older than N days with dry-run support
port_scanner.sh— Scans a host or subnet for open ports (internal use)check_connectivity.sh— Multi-target connectivity health check with latency reporting
system_health_check.sh— Unified CPU, RAM, and disk snapshot with alert thresholdsprocess_monitor.sh— Watchdog that restarts defined processes if they go down
rsync_backup.sh— Incremental backup with rsync, retention policy, and loggingbackup_report.sh— Parses backup logs and sends summary report
bulk_user_create.sh— Creates users in bulk from a CSV file with group assignment
MIT
# Disk report with custom threshold
./disk/disk_usage_report.sh --threshold 75 --output /tmp/report.txt
# Connectivity check with custom targets file
./network/check_connectivity.sh --targets-file ./network/targets.txt
# Backup with 14-day retention
./backup/rsync_backup.sh --source /data --dest /mnt/backups --retain 14
# Dry-run user creation
./user_management/bulk_user_create.sh --csv users.csv --dry-runPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Make sure scripts pass shellcheck before submitting.
- Initial release with disk, network, monitoring, backup, and user management modules
- Full dry-run support across all destructive operations
- POSIX-compatible, tested on RHEL 8/9 and Ubuntu 20.04/22.04