find . -type d -depth -print0 | xargs -0 prog