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

Re: listing/deleting empty directories recursively



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