- Log in to post comments
#!/bin/bash
DIR=/home/mx
for i in $(ls $DIR);
do
IN=$DIR/$i
OUT=/home/backup/mx/${i}_$(date -I).tar.bz2
echo "$IN > $OUT"
tar -cjf $OUT $IN
done
#!/bin/bash
DIR=/home/mx
for i in $(ls $DIR);
do
IN=$DIR/$i
OUT=/home/backup/mx/${i}_$(date -I).tar.bz2
echo "$IN > $OUT"
tar -cjf $OUT $IN
done