From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from minnie.tuhs.org (minnie.tuhs.org [50.116.15.146]) by inbox.vuxu.org (Postfix) with ESMTP id 03BA2265CC for ; Fri, 28 Jun 2024 00:22:57 +0200 (CEST) Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 5715343DB6; Fri, 28 Jun 2024 08:22:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuhs.org; s=dkim; t=1719526971; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=MQivlGW+RHIghXkR+/FfAs92qohp/qHti5qu3B77WZc=; b=tOOV5vgu0egrWdGJ1IxaXpPtlg+PWAVuGjyb7ZmxYONmzCagQlpCt64s/LBGdm5b183+pi OXEeWL1VLZLEf3I4dBRHRSc85MNP3B+3MRWvA0uA/4ZnKy91ojz5sKn85kL68Xqzu+Bxh4 FBOKNBXVtxMWeaCk6QOkXidLIaW+V8s= Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by minnie.tuhs.org (Postfix) with ESMTPS id B4A4443B0E for ; Fri, 28 Jun 2024 08:22:44 +1000 (AEST) Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-7067a2e9607so11376b3a.3 for ; Thu, 27 Jun 2024 15:22:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iitbombay-org.20230601.gappssmtp.com; s=20230601; t=1719526963; x=1720131763; darn=tuhs.org; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=MQivlGW+RHIghXkR+/FfAs92qohp/qHti5qu3B77WZc=; b=WcTIhrxamaZ86gJ9IBxv2WkgQF0YbuRRJz1NTnt5I6xgfBheznLEcxq+Vk0IZV1yET mRC5tJ035jfIS28IKykCCDc4WmxqKOjABGdklygLF69NxKoe1dbVfp8MyWyihJvGsBwt r9irDryvjqOE9nNRws6gEVNMM6eKirXngDla5jDGNqjaxIWXJ25h6dfZZIajAsGFh2Oj bGld7vA9a7MjcyZXz2ExhipC0L7FHAXdyvKx1SG7tf1ASuOVqMBAASavwsF8GI67y6gK wCySELM005oVZuEMiaGdWZbTQrKhpx06/WY8XXLprKKpqDAhSqwEah+r/rbwnHOoQNdH 7Zlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719526963; x=1720131763; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MQivlGW+RHIghXkR+/FfAs92qohp/qHti5qu3B77WZc=; b=uMiBPlY7vRQJHsw0F+DD+1H6zdCdhRZ/cuk1rl3QmhcnLuOWIDYnqBlRNDwgUHpvZt tMfJQvQf4hlf+k1MWJ4yLYP4s03S/3gj01bcPAW1cUjZIVR38U5Chje41DT7EGLaEoZG I2m8Ltp6CvIST2eBiBzR3LokwclR736BklOj6XUg1Ph4mAVEi1sPH9eCNq+GHSA2Gja7 Nz5hMRs35D2/uzg2+P51VPllk6zUFoxKf1I8Bqn6e1qex2IGWI14xwWL3QxGiGdww9+q Dmde85AqajMHIpCl+pE83zh19C2MhZJBc4vIqZc4hybALGroKVR3PR+baT0asqoOk2YL FSAw== X-Gm-Message-State: AOJu0YzoZFXn/BNjfa/gXFbeAZjCvk/g3m9vKhBiwWdzslU5hU4NWMhW AHdDVpf4ZiFkVQ9oY9cwMBM3Ew8PeF+ocbU1WGmIzUWepzeznPoRre+0URD2H71W/eOVNMJ7YvQ = X-Google-Smtp-Source: AGHT+IEuuuZyDLJp1df4RSLY7GW4/H/EDMYet26rsr1ar6oTgi4olL8R+Icizhc5Ox5QkJYhN8pDPA== X-Received: by 2002:aa7:990e:0:b0:705:9748:7bb8 with SMTP id d2e1a72fcca58-70671034a55mr16222623b3a.29.1719526963180; Thu, 27 Jun 2024 15:22:43 -0700 (PDT) Received: from smtpclient.apple (107-215-223-229.lightspeed.sntcca.sbcglobal.net. [107.215.223.229]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-708044ae297sm218818b3a.155.2024.06.27.15.22.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jun 2024 15:22:42 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Date: Thu, 27 Jun 2024 15:22:31 -0700 References: <87zfr6emzq.fsf@vuxu.org> To: The Unix Heritage Society mailing list In-Reply-To: <87zfr6emzq.fsf@vuxu.org> Message-Id: <09043D5C-5885-4AB0-A215-57092D3B40AE@iitbombay.org> X-Mailer: Apple Mail (2.3774.600.62) Message-ID-Hash: CGT7YWXUJBSFP3MCCIG5XSI47JXPIGXR X-Message-ID-Hash: CGT7YWXUJBSFP3MCCIG5XSI47JXPIGXR X-MailFrom: bakul@iitbombay.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: another OSX 100% less Unix List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Bakul Shah via TUHS Reply-To: Bakul Shah On Jun 27, 2024, at 2:47=E2=80=AFAM, Leah Neukirchen = wrote: >=20 > ron minnich writes: >> ronsexcllentmbp:t rminnich$ cpio -ivt < ../t.cpio >> -rw-r--r-- 1 rminnich wheel 0 Jun 26 20:21 a >> -rw-r--r-- 2 rminnich wheel 0 Jun 26 20:21 b >> -rw-r--r-- 2 rminnich wheel 0 Jun 26 20:21 c link to b >>=20 >> "c link to b"? wtf? Who thought that was a good idea? because ... This is a bit tricky. Linux doesn't add ' link to b' so you don't know what c is linked to. If you want to show this info using any printable char, you get in trouble as a file of the same name can be made! Tar is a bit better: $ touch a; ln a b; touch 'b link to a'; ln 'b link to a' c $ ls | tar -cI - | tar -tv -rw-r--r-- 0 bakul wheel 58 Jun 27 14:50 a hrw-r--r-- 0 bakul wheel 0 Jun 27 14:50 b link to a -rw-r--r-- 0 bakul wheel 0 Jun 27 14:39 b link to a hrw-r--r-- 0 bakul wheel 0 Jun 27 14:39 c link to b link to a That 'h' in this first column tells you this is a hard link. Not so with cpio! $ ls | cpio -o | cpio -ivt 2 blocks -rw-r--r-- 2 bakul wheel 58 Jun 27 14:50 a -rw-r--r-- 2 bakul wheel 58 Jun 27 14:50 b link to a -rw-r--r-- 2 bakul wheel 0 Jun 27 14:39 b link to a -rw-r--r-- 2 bakul wheel 0 Jun 27 14:39 c link to b link = to a I think at the very least this extra info should be displayed using another flag. >> ronsexcllentmbp:t rminnich$ touch 'c link to b' >> ronsexcllentmbp:t rminnich$ ls -l >> total 0 >> -rw-r--r-- 1 rminnich wheel 0 Jun 26 20:21 a >> -rw-r--r-- 2 rminnich wheel 0 Jun 26 20:21 b >> -rw-r--r-- 2 rminnich wheel 0 Jun 26 20:21 c >> -rw-r--r-- 1 rminnich wheel 0 Jun 26 20:22 c link to b >=20 > This is a feature of libarchive (cpio since FreeBSD 8), note that > without -v it prints the actual names as tools expect it. > (Similarly, symlinks are printed as "c -> b".) >=20 > More fun is that it's not able to extract only "c", even tho the ASCII > cpio format stores hard links by duplicating the data... This feels more like a half done job. tar doesn't duplicate the data so the extraction fails. cpio duplicates the data so fixing the bug would be easy. It is not at all clear what is the right choice (re whether to duplicate the data or not), especially if I have a very large file with multiple hard links. I tend to think *not* duplicating the data is the right choice as you can always re-run tar x and extract the original as well as the hard linked name. But you may think differently. In any case, the original culprit is libarchive (on FreeBSD) as Leah pointed out, not OSX! What is more, dealing with hardlinks & copying has always been troublesome.=20