#!/bin/sh -x set -e test -L foo rm foo (find -depth -type d -print | xargs -r rmdir 2>/dev/null) || true exit 0