pennabadi-umamaheswarreddy /
shell-practice
This repository contains shell scripting practice files covering variables, conditions, loops, special parameters, backup scripts, log management, and automation basics.
Loading repository data…
Nikoo-Asadnejad / repository
This repository contains a collection of useful Bash scripts for Linux systems. Each script serves a specific purpose, ranging from system maintenance to monitoring and automation tasks. Below is a description of each script along with instructions on how to use them.
This repository contains a collection of useful Bash scripts for Linux systems. Each script serves a specific purpose, ranging from system maintenance to monitoring and automation tasks. Below is a description of each script along with instructions on how to use them.
| Script Name | Purpose |
|---|---|
auto_git_commit.sh | Automatically commits staged changes with a standardized commit message. |
backup.sh | Backs up a specified directory into a dated folder. |
cpu_usage_alert.sh | Monitors CPU usage and sends an alert (e.g., via email) when usage exceeds a threshold. |
disk_usage_alert.sh | Checks disk usage and alerts if it passes a set limit. |
find_top_cpu_processes.sh | Lists processes consuming the most CPU. |
find_top_memory_processes.sh | Lists processes consuming the most memory. |
install_docker.sh | Automates Docker installation on the host. |
monitor_uptime.sh | Records system uptime periodically (ideal via cron). |
parse_log.sh | Extracts and summarizes key data from log files. |
publish.sh & publish.ps1 | Automates publishing tasks; supports both Bash and PowerShell environments. |
resize_image.sh | Resizes images to predefined dimensions. |
send_email.sh | Sends an email with attachments or notifications. |
service_status_check.sh | Monitors and restarts a service if it’s down. |
system_update_cleanup.sh | Updates the system and cleans up unused packages. |
top_largest_files.sh | Identifies and lists the largest files in a directory tree. |
website_health_check.sh | Tests website availability and alerts on downtime. |
chmod +x *.sh
./script_name.sh
backup.sh)This script creates a backup of a specified directory and stores it in a backup directory with the current date.
SOURCE_DIR and BACKUP_DIR variables with the paths you want to back up and where you want to store the backup../backup.sh
This script checks the disk usage of the root partition and sends an alert email if it exceeds a specified threshold.
./disk_usage_alert.sh
This script updates the system, cleans up unnecessary files, and removes unused packages to free up space.
sudo ./system_update_cleanup.sh
This script logs the server uptime to a file. It can be set to run at regular intervals using a cron job.
./monitor_uptime.sh
This script checks the status of a specified service and restarts it if it is not running.
.sudo ./service_status_check.sh
This guide provides step-by-step instructions to add various Bash scripts as cron jobs on Linux systems. Cron jobs allow you to schedule scripts to run automatically at specified intervals, making it easier to manage system maintenance, monitoring, and automation tasks.
Ensure the scripts are executable:
chmod +x /path/to/your_script.sh
Some scripts may require root privileges. Use sudo where applicable.
Add Scripts as Cron Jobs:
crontab -e
Add entries to the crontab file in the following format:
Cron Scheduling Patterns:
Selected from shared topics, language and repository description—not editorial ratings.
pennabadi-umamaheswarreddy /
This repository contains shell scripting practice files covering variables, conditions, loops, special parameters, backup scripts, log management, and automation basics.
Abdullahshatarh122 /
This repository contains two Linux shell scripts: a Backup Script for automated file and directory backups and a System Health Report Script for monitoring system status.