PLUGLINUX_HUB
terminal

Royal Level — Scripting & Systems

Now that you've mastered the basics, it's time to take control. Learn to automate tasks with Bash, manage file permissions, and configure your first services.

$ Start Royal Module
check_circleLittle Blue Assessment Completed
backup.sh — bash
#!/bin/bash

# Simple Backup Script
SOURCE_DIR="/var/www/html"
BACKUP_DIR="/backup/web"
DATE=$(date +%Y-%m-%d)

echo "Starting backup..."

tar -czf $BACKUP_DIR/web-$DATE.tar.gz $SOURCE_DIR

if [ $? -eq 0 ]; then
    echo -e "\e[32mBackup successful!\e[0m"
else
    echo -e "\e[31mBackup failed.\e[0m"
fi