hakanersu
3/10/2014 - 3:57 PM

Zip for old log files manually.

Zip for old log files manually.

#!/bin/bash
param1=$1
param2=$2
user="/backup/log/*"
for i in $user;do
    gun="$param2"
    ay="$param1"
    if [ -d "$i/2014/$ay/$gun/" ]; then
    cd $i/2014/$ay/  
    zip -r $gun.zip $gun
    rm -rf $gun
    fi
done