Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Globbing for Empty Directories?
- X-seq: zsh-users 7279
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Aaron Davies <agdavi01@xxxxxxxxxxxxxx>
- Subject: Re: Globbing for Empty Directories?
- Date: Sun, 28 Mar 2004 21:49:21 +0200
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <9E7AF602-8085-11D8-AA68-000502631FBD@xxxxxxxxxxxxxx>
- Mail-followup-to: Aaron Davies <agdavi01@xxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <9E7AF602-8085-11D8-AA68-000502631FBD@xxxxxxxxxxxxxx>
Hi Aaron :)
* Aaron Davies <agdavi01@xxxxxxxxxxxxxx> dixit:
> Is there a way to get empty directories from a glob pattern? '*(L0)'
> finds empty files, but doesn't work for dirs. I'm looking for something
> the equivalent of find's -empty argument, since I hate find with a
> passion and would love to never use it again.
There is not, AFAIK. See the mailing list archives, I asked more
or less the same a few months ago. Testing for the number of links
won't work for directories :(( The only way is to look whether the
directory has files in it, with some globbing pattern; if the
expansion is empty, then the directory is empty.
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author