Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Globbing for Empty Directories?
- X-seq: zsh-users 7295
- From: Danek Duvall <duvall@xxxxxxxxxxx>
- To: Aaron Davies <agdavi01@xxxxxxxxxxxxxx>
- Subject: Re: Globbing for Empty Directories?
- Date: Mon, 29 Mar 2004 07:19:20 -0800
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20040329132800.GA7384@DervishD>
- Mail-followup-to: Danek Duvall <duvall@xxxxxxxxxxx>, Aaron Davies <agdavi01@xxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040328194921.GA6311@DervishD> <CA7477A0-8146-11D8-913F-000502631FBD@xxxxxxxxxxxxxx> <20040329132800.GA7384@DervishD>
On Mon, Mar 29, 2004 at 03:28:00PM +0200, DervishD wrote:
> > Adding any subdirectories or files to it seems to increase the
> > number of links it has.
>
> Not under Linux, at least, although it may depend on the
> filesystem type. For ext3, only subdirs increase the number of links
> of a directory.
As it should be. Think of it this way. st_nlink is the number of names
a filesystem object has on a filesystem. For any directory, that'll be
1) the name the directory has in its parent, 2) the name "." it contains
itself, and 3-nlink) the name ".." its children contain.
Non-directory files (generally) don't contain other files, so they won't
add to st_nlink.
Danek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author