#!/usr/bin/env sh set -xe dir=/media/hdd/backup name="$(date +%F)-$(date +%T)-$(basename $1).tar.xz" XZ_OPT='-T0 -9' tar -Jcvf $dir/$name $1