The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: clemc@ccc.com (Clem Cole)
Subject: [TUHS] why does tar have the tape device hard coded into it and why is it mt1 instead of mt0
Date: Fri, 11 Dec 2015 17:31:48 -0500	[thread overview]
Message-ID: <CAC20D2Mw1DyJq0v-YOZOe2CaG=Kx0=6TWBth+bNz1n29myL58Q@mail.gmail.com> (raw)
In-Reply-To: <566B4DD0.6070700@gmail.com>

First, the device # should be usable from the command line, i.e.  tar cv0
foo

As for mt, it was written for the tape device and in those days most of us
had at least one 9-track device.    I have no memory of why Ken used mt1
not mt0.   Doug may know.

On Fri, Dec 11, 2015 at 5:27 PM, Will Senn <will.senn at gmail.com> wrote:

> All,
>
> In my exploration of v6, I followed the advice in "Setting up Unix -
> Seventh Edition" and copied v6tar from v7 to v6. Life is good. However, tar
> is using mt1 and it is hard coded into the source, tar.c:
> char    magtape[]       = "/dev/mt1";
>
> As the subject line suggested, I have two questions for those of you who
> might know:
>
> 1. Why is it hard coded?
> 2. Why is it the second device and not the first?
>
> Interestingly, it took me a little while to figure out it was doing this
> because I didn't actually move files between v6 and v7 until today. Before
> this my tests had been limited to separate tests on v6 and v7 along the
> lines of:
>
> cd /wherever
> tar c .
> followed by
> tar t
> list of files
> cd /elsewhere
> tar x
> files extracted and matching
>
> What it was doing was writing to the non-existant /dev/mt1, which it then
> created, tarring up stuff, and exiting. Then when I listed the contents of
> the tarfile, or extracted the contents, it was successful. But, when I went
> to move the tape between v6 and v7, the tape (mt0) was blank, of course. It
> was at this point that I followed  Noel's advice and "Used the source", and
> figured out that it was hard-coded as you see above.
>
> Thanks,
>
> Will
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> http://minnie.tuhs.org/cgi-bin/mailman/listinfo/tuhs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20151211/8384cbce/attachment.html>


  reply	other threads:[~2015-12-11 22:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 22:27 Will Senn
2015-12-11 22:31 ` Clem Cole [this message]
2015-12-11 22:52   ` Will Senn
2015-12-11 23:13     ` John Cowan
2015-12-12  0:26       ` Random832
2015-12-12  2:09 Doug McIlroy
2015-12-12 18:54 ` Mary Ann Horton
2015-12-12 19:58   ` Armando Stettner
2015-12-12 20:13   ` Clem Cole
2015-12-12 22:44     ` Lyndon Nerenberg
2015-12-12 20:57   ` John Cowan
2015-12-12 17:17 [TUHS] TUHS] " Doug McIlroy
2015-12-12 20:17 ` [TUHS] " Diomidis Spinellis
2015-12-13  1:41 Norman Wilson
2015-12-13  3:04 ` Lyndon Nerenberg

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='CAC20D2Mw1DyJq0v-YOZOe2CaG=Kx0=6TWBth+bNz1n29myL58Q@mail.gmail.com' \
    --to=clemc@ccc.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).