Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Tip of the day: prune empty directory hierarchies
- X-seq: zsh-workers 35661
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: Tip of the day: prune empty directory hierarchies
- Date: Mon, 29 Jun 2015 16:43:50 +0100
- In-reply-to: <20150629155927.289729cb__2821.95612458072$1435590676$gmane$org@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20150629155927.289729cb__2821.95612458072$1435590676$gmane$org@pwslap01u.europe.root.pri>
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