The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: random832@fastmail.com (Random832)
Subject: [TUHS] why does tar have the tape device hard coded into it and why is it mt1 instead of mt0
Date: Sat, 12 Dec 2015 00:26:55 +0000 (UTC)	[thread overview]
Message-ID: <n4fpkf$f6v$1@ger.gmane.org> (raw)
In-Reply-To: <20151211231355.GH30075@mercury.ccil.org>

On 2015-12-11, John Cowan <cowan at mercury.ccil.org> wrote:
> Will Senn scripsit:
>
>> Thanks, that'll teach me to read the man pages more carefully even
>> when the command is familiar in its modern form. 
>
> Note that if -f is not given, modern tars still default to the tape
> drive, /dev/st0 on Linux or /dev/sa0 on *BSD.

That depends on the tar. A lot these days default to stdin (or
stdout as appropriate to the operation). Many don't even support
the "drive number" option. OSX knows nothing of the options, and
Ubuntu's GNU tar says:

tar: Options '-[0-7][lmh]' not supported by *this* tar

GNU tar has the capability, but it's apparently not a very
well-used feature, since the ./configure script it ships with
has a bug in a sed command meant to convert e.g. "/dev/st0" to
"/dev/st" [prefix for 0-7 to be appended to].

Star switched in 1982, according to the author. And in any case
even when POSIX did define tar, it only said the default was
"system-dependent".

The only one I could find that keeps this alive is bsdtar
(libarchive) which apparently will even use something called
\\.\tape0 if compiled for Windows. But it doesn't actually
support the 0-7 options.

Well, that and OpenSolaris tar. Which apparently gets devices
_and_ blocking factors corresponding to arguments 0-7 from
/etc/default/tar:

> archive0=/dev/rmt/0		20	0
> archive1=/dev/rmt/0n		20	0
> archive2=/dev/rmt/1		20	0
> archive3=/dev/rmt/1n		20	0
> archive4=/dev/rmt/0		126	0
> archive5=/dev/rmt/0n		126	0
> archive6=/dev/rmt/1		126	0
> archive7=/dev/rmt/1n		126	0

(The third argument is a size parameter; you're supposed to use
it if you define one of the devices to be a floppy drive.)




  reply	other threads:[~2015-12-12  0:26 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
2015-12-11 22:52   ` Will Senn
2015-12-11 23:13     ` John Cowan
2015-12-12  0:26       ` Random832 [this message]
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='n4fpkf$f6v$1@ger.gmane.org' \
    --to=random832@fastmail.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).