• Skripts kas failus saspiež un noliek uz FTP servera

    #!/bin/bash
    USERNAME="lietotajvards"
    PASSWORD="parole"
    SERVER="mansserveris.lv"
    MYFILES="/home/user/myfiles"
    ARH="/home/user/temp"
    DOW=$(date +"%A")
    tar cpPzf $ARH/myfiles.tgz $MYFILES
    echo "myfiles ok"
    lftp -u $USERNAME,$PASSWORD -e "cd /$DOW; mput $ARH/*; quit" $SERVER
    rm $ARH/*

    * nepieciešams uzinstalēt lftp pakotni