Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 2.03 KB

File metadata and controls

70 lines (48 loc) · 2.03 KB

Bash Automation Scripts

A collection of Bash scripts to automate common system and cloud tasks.


📂 Categories

🛠️ System Administration

  • update-system.sh – Detects Linux distribution and updates packages using the appropriate package manager.
  • system-cleanup.sh – Cleans up system by removing unused packages and caches (distro-aware).
  • system-info.sh – Shows system details: hostname, OS, kernel, uptime, users, memory, CPU, network, and disk.
  • sys-health-check.sh – Displays memory/disk usage, system load, and launches htop for real-time monitoring.

🔄 Backup & Restore

  • backup.sh – Creates timestamped compressed backups of a directory to ~/backups, with logs.
    • Example backup path:
      ~/backups/backup_YYYY-MM-DD_HH-MM-SS.tar.gz
    • Log location:
      ~/backups/backup.log

☁️ Azure Cloud Automation

  • azure_resource_list.sh – Lists Azure resources by type using Azure CLI.
    Supported services: vm, storage, db, cosmos, function, disk, lb, cdn, monitor, event, queue, dns, network, ad, rg.

⚠️ Requires Azure CLI and active login (az login). Ensure your account has sufficient permissions to list the resources.


🚀 Usage

  1. Clone the repository:

    git clone https://github.com/ariefshaik7/bash-scripts.git
    cd bash-scripts
  2. Make a script executable:

    chmod +x scriptname.sh
  3. Run the script:

    ./scriptname.sh

📋 Requirements

  • Bash shell
  • Linux-based system
  • Azure CLI (for Azure-related scripts)

🤝 Contributions

Feel free to fork this repo, open issues, and submit pull requests to improve and expand the setup!

📄 License

This project is licensed under the MIT License.