Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Apr 2024 17:57:57 +0100
From:      Jessica Clarke <jrtc27@freebsd.org>
To:        Mark Millard <marklmi@yahoo.com>
Cc:        dev-commits-src-main@freebsd.org, "cperciva@freebsd.org" <cperciva@FreeBSD.org>
Subject:   Re: git: a1bff97300ab - main - release: Don't reuse disc1/bootonly directories
Message-ID:  <2AA8E587-7ED4-434B-AE5A-64CB021A55F9@freebsd.org>
In-Reply-To: <73727045-7276-465F-9567-32C7A4FDDAE0@yahoo.com>
References:  <73727045-7276-465F-9567-32C7A4FDDAE0.ref@yahoo.com> <73727045-7276-465F-9567-32C7A4FDDAE0@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10 Apr 2024, at 17:48, Mark Millard <marklmi@yahoo.com> wrote:
>=20
> Jessica Clarke <jrtc27_at_freebsd.org> wrote on
> Date: Wed, 10 Apr 2024 05:18:23 UTC :
>=20
>> On 10 Apr 2024, at 04:29, Colin Percival <cperciva@FreeBSD.org> =
wrote:
>>>=20
>>> . . .
>>>=20
>>> +disc1-disc1 disc1-memstick: disc1
>>> + mkdir ${.TARGET}
>>> + tar -cf- -C disc1 . | tar -xf- -C ${.TARGET}
>>=20
>> What=E2=80=99s wrong with cp -a?
>=20
> A possibility from "man cp":
>=20
> QUOTE
>           Note that cp copies hard linked files as separate files.  If =
you
>           need to preserve hard links, consider using tar(1), cpio(1), =
or
>           pax(1) instead.
> END QUOTE
>=20
> cp should be avoided if there might be hard links involved on the =
source materials
> that should be preserved in the destination material produced.

Fair enough then.

>> Besides, shouldn=E2=80=99t this use -p if using tar?
>=20
>=20
> (I'm not commenting on the above.)
>=20
>>=20
>> And -f- is the same as nothing.
>=20
> "man tar" reports the deafult as /dev/sa0 on FreeBSD:
>=20
> QUOTE
>     -f file, --file file
>             Read the archive from or write the archive to the =
specified file.
>             The filename can be - for standard input or standard =
output.  The
>             default varies by system; on FreeBSD, the default is =
/dev/sa0; on
>             Linux, the default is /dev/st0.
> END QUOTE

I dug some more, and the documentation is incomplete:

* If TAPE is set in the environment it will use that.
* Otherwise, if _PATH_DEFTAPE (the default documented there) can be
  accessed per access(2) it will use that.
* Otherwise it will use stdin/stdout.

Since most people don=E2=80=99t set TAPE, nor do they have a tape device
present, this effectively means that no -f means -f -, but technically
one should not rely on this. So TIL.

Jess




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2AA8E587-7ED4-434B-AE5A-64CB021A55F9>