The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: norman@oclsc.org (Norman Wilson)
To: tuhs@tuhs.org
Subject: Re: [TUHS] Binary log files
Date: Mon,  5 Jul 2021 16:26:12 -0400 (EDT)	[thread overview]
Message-ID: <20210705202612.BF641640CC6@lignose.oclsc.org> (raw)

Some of us have, literally for decades, been dealing with
wtmp by rolling it weekly or monthly or quarterly or whatever,
letting cron run something like

	cd /usr/adm	# that's how long I've been doing this!
	umask 022
	>wtmp.new
	ln wtmp wtmp.prev
	mv wtmp.new wtmp
	# also so long ago there was no seq(1)
	nums=`awk 'BEGIN {for (i = 12; i >= 0; i--) print i; exit}'`
	for i in $nums; do
		inext=`expr $i + 1`
		if [ -f wtmp.$i ]; then
			mv wtmp.$i wtmp.$inext
		fi
	done
	mv wtmp.prev wtmp.0

This really isn't rocket science.  It isn't even particularly
interesting UNIX history.  Can we move on to something that IS
interesting?

Here are some things I find more interesting:

1.  utmp came before wtmp: utmp(V) appears in the First Edition
manual, wtmp(V) only in the Second.  Apparently interest in
who else is logged in right now predated interest in who has
logged in recently.

2.  Both files started out in /tmp.  wtmp is first said to be
in /usr/adm instead in the Fifth Edition manual, utmp in /etc
in the Sixth.

3.  The names /tmp/utmp and /tmp/wtmp appear to have been
issued by the Department of Redundancy Department.  I think
it quite likely that Ken and Dennis would have been familiar
with that joke once the recording containing it was issued
in mid-1970, but I don't know whether utmp existed in some
form before that.  I see no sign of it in the fragments of
PDP-7 source code we have (in particular init doesn't seem
to use it), but what about later PDP-7 or very early PDP-11
code predating the late-1971 First Edition manual?

Norman Wilson
Toronto ON
Not Insane

             reply	other threads:[~2021-07-05 20:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 20:26 Norman Wilson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-05  2:53 John Cowan
2021-07-05 13:41 ` Steffen Nurpmeso
2021-07-05 15:12   ` John Cowan
2021-07-05 19:25     ` Steffen Nurpmeso

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=20210705202612.BF641640CC6@lignose.oclsc.org \
    --to=norman@oclsc.org \
    --cc=tuhs@tuhs.org \
    /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).