#!/bin/sh PATH=/usr/sbin:/usr/bin:/bin export PATH rm -f /tmp/mtree.out.$$ mtree -c -k mode,size,time,md5digest -X /archive/MTREE/exclude-list -p /archive > /tmp/mtree.out.$$ if [ "$?" -eq 0 ]; then mv /tmp/mtree.out.$$ /archive/MTREE/mtree.out else echo "Error occured, not replacing old mtree.out" fi