Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Tip of the day: prune empty directory hierarchies



2015-06-29 15:59:27 +0100, Peter Stephenson:
[...]
> local -aU dirs
> 
> dirs=(**/*(ND/^F))
> while (( ${#dirs} )); do
>   rmdir $dirs || return
[...]

Missing -- above.

With GNU `find`:

find . -depth -type d -empty -delete

-- 
Stephane



Messages sorted by: Reverse Date, Date, Thread, Author