The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: dmr@plan9.bell-labs.com (Dennis Ritchie)
Subject: [TUHS] (no subject)
Date: Fri, 23 May 2003 00:10:30 -0400	[thread overview]
Message-ID: <e0190f1c49950f6047d23047f9a45a1f@plan9.bell-labs.com> (raw)

 > The V7 ls(1) man page says that the -s option, which prints total
 >blocks, includes any indirect blocks.

 >However, the V7 struct stat didn't have the st_blocks member in the
 > struct stat, and the code in ls.c uses

 > 	long
 >	nblock(size)
 >	long size;
 >	{
 >		return((size+511)>>9);
 >	}

 >So, is this just a case of the man page being mistaken?

Yes, it looks like a manual bug. Retrieving
the true number of indirect blocks isn't possible
from the 7th edition stat.  I'm not sure when (or by
whom) the st_blocks member was added.

 > While I'm at it, the V7 ls -a option only adds . and .. to the
 > list; apparently all other dot files were printed by default.
 > When did ls change such that -a applied to all dot files?

UCB or USL did this (I'm sure which first).
Both tended to use more . files.

	Dennis



             reply	other threads:[~2003-05-23  4:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-23  4:10 Dennis Ritchie [this message]
2003-05-24  3:42 ` Kenneth Stailey
2005-07-20 21:17 Brantley Coile
2006-02-22  5:08 dmr
2010-01-13  3:42 Larry McVoy
2015-07-18 17:43 Mark Longridge
2015-07-18 17:53 ` Larry McVoy
2015-07-19  0:57   ` Warren Toomey
2015-07-19  1:13     ` Larry McVoy
2015-07-19  1:19       ` Milo Velimirovic
2015-07-19 20:55 Brian Walden
2015-12-24 18:09 scj
2015-12-24 18:09 scj
2015-12-26  4:49 Doug McIlroy
2015-12-26  4:51 Doug McIlroy
2021-04-05 22:43 M Douglas McIlroy
2021-04-06  7:23 ` arnold
2021-04-06 23:25 ` Dave Horsfall
2021-04-07  1:01   ` Jon Steinhart
2022-01-11 23:02 Douglas McIlroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0190f1c49950f6047d23047f9a45a1f@plan9.bell-labs.com \
    --to=dmr@plan9.bell-labs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).