@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

からっぽのディレクトリを消すコマンド

find ./target -type d -empty -delete

消す前に確認するなら

find ./target -type d -empty -print

でも、ディレクトリがあると空と判定されないので、からっぽのディレクトリがあるディレクトリは消えない。

find ./target -type d -empty -delete

これを何度も実行することで、どんどん上位のディレクトリが消える。ちょっと手間。

unix.stackexchange.com