Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: listing/deleting empty directories recursively
- X-seq: zsh-users 9695
- From: Thor Andreassen <ta@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: listing/deleting empty directories recursively
- Date: Sat, 19 Nov 2005 12:59:27 +0100
- In-reply-to: <20051119115653.GA329@xxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <tfrtn1dt9nf26m1rka6b9kg3bmcoa2evs4@xxxxxxx> <200511191057.25776.cht@xxxxxxxxx> <103un195cji6u17l0kj1ijkvfj2vn9o3r5@xxxxxxx> <20051119115653.GA329@xxxxxxxxxxxx>
On Sat, Nov 19, 2005 at 12:56:53PM +0100, Thor Andreassen wrote:
[snip]
> This should do the trick:
>
> for dir in `ls -ld **/*(/^F)`; do echo $dir > LOGFILE; rmdir $dir; done
You should use double quotes (") around the dir variable if you have
dirnames with spaces (and some other chars), i.e. echo "$dir" and rmdir
"$dir".
--
Thor Andreassen
Messages sorted by:
Reverse Date,
Date,
Thread,
Author