#!/bin/sh # # put all files of a directory subtree into a compressed tar(1) archive # and remove the files from the directory. # # cd $1 find . -type f -print > /tmp/$$.files tar czfT ../$1.tar.z /tmp/$$.files for f in $(cat /tmp/$$.files) do rm -f $f done rm -f $$.files