rmdir prg cd.. mv $(basename $i)-$(dirname $i).dir../dir/ ) & ) done Then the following script will search for extra copies of every item on the candidate tape: cd dir for md5 in $(md5 -q 8706a.tap-1.dir/??
-name \*.tap | cut -c 3-`; do ( ( cd $(dirname $i) rm -rf $(basename $i)-$(dirname $i).dir mkdir $(basename $i)-$(dirname $i).dir cd $(basename $i)-$(dirname $i).dir tapclean -t../$(basename $i) -doprg mv prg/*.