[prev] [thread] [next] [lurker] [Date index for 2005/10/01]
On Fri, Sep 30, 2005 at 02:06:00PM -0500, Luke Kanies wrote: > On Fri, 30 Sep 2005, Nicholas Clark wrote: > > > On Fri, Sep 30, 2005 at 01:36:05PM -0500, Luke Kanies wrote: > > > > > They're hard links (you'll have to look that one up). A little known > > > aspect of the output of ls -al is that it lists the number of hard links > > > to a file, and directories (almost) always have >=2, because one is the > > > > I realise that this is off topic for hating (and I will be hated by some > > for this) but when doesn't a directory have a hard link count >= 2? > > [on a filing system that doesn't cause all directories to report a link count > > of 1, as I believe is the case for most Unix mounted CDs] > > > > .. of / is a link to itself, so it is always >= 2, and that's the obvious one > > covered. > > Truthfully, I only threw in the 'almost' because I expected that without > it someone would pipe that on Plan 9 using filesystem from_mars the > poobah special device is basically a directory but only has on hard > link. GNU find, -noleaf option: "Do not optimize by assuming that directories contain 2 fewer subdirectories than their hard link count. This option is needed when searching filesystems that do not follow the Unix directory-link convention, such as CD-ROM or MS-DOS filesystems or AFS volume mount points." This assumption lends a little extra speed because we still don't have filesystems which provide fast access to enough metadata that stat(2) doesn't suck horribly. GNU find will assume that once it's hit (nlinks-2) directories, it can stop checking everything else it stumbles across to see whether it's a directory or a file. What's rediculous is that we're so entrenched in UNIX tradition that you have Linux kernel developers refusing to permit non-standard VFS additions which would provide additional benefits to users of a certain developmental filesystem, because it's not UNIX-y enough. They want interface standardization first, but without allowing developers to test different interfaces it's hard to get real-world usage data and the feedback necessary to make a standard useful. Declaring a kernel interface stable without a good bit of end-user hammering makes software suck more, because rather than letting things evolve into usefulness you force software to conform to a prematurely distilled API. Instead, filesystem semantics still suck, and find has to continue to do stupid tricks in order to feel more responsive. Hateful. Also, curse you, Thunderbird, for not being able to show me the proper 80ish-column wrapped version of text so that I can properly block indent the above text rather than enclose it in the somewhat less appropriate double quotation marks. It's downright foolish to support HTML in email anyways, let alone force a mail client to act as a bastardized messaging program and HTML editor. What's next, an image editor? It's garbage like this that makes me wish my wireless connection weren't so flaky. I could then go back to using Mutt, which at least admits that mail software is hateful. Epilogue: Cut and pasted into Mutt, because Firefox isn't configured with all of my mail aliases on this machine, and only this one is subscribed. Left the Thunderbird rant because it's still hateful.There's stuff above here
Generated at 16:00 on 04 Oct 2005 by mariachi 0.52