#!/bin/sh # recursively delete empty directories find . -depth \ -path "." -prune -or \ -type d -empty -exec rmdir -v {} \;