#!/bin/bash if [ -z "$1" ]; then echo usage: $0 directory exit fi SRCD=$1 TGTD="/home/$USER/backups/" OF=home-$(date +%Y%m%d).tgz tar -czf $TGTD$OF $SRCD