linuxkurs/beispiele/4/archive-dir.sh

10 lines
167 B
Bash
Raw Normal View History

2019-01-07 09:55:04 +01:00
#!/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