Stephane Chazelas wrote, on 08 Dec 2022:
>
> IMO, pax -0 should make it to issue 8 though as it's largely
> unusable without it.

That depends on what you want to use it for.

Our intention is not to make pathnames with newlines equally as
usable as those without. It is just to provide ways for
applications to protect themselves from misbehaving if they
are encountered.  Although find -print0, read -d "", and xargs -0
aren't strictly necessary for that, their use is sufficiently
popular that there is a valid case for standardising them.

To protect uses of pax from pathnames with newlines you can do:

LC_ALL=C find . -name $'*\n*' -prune -o -print | pax -w -d ...

I suppose if there are such pathnames in an archive, having -0 would
allow you to list them and feed the output to xargs -0 or read -d "",
but since Issue 8 pax won't be able to extract files whose pathnames
contain newlines (except by renaming them with -s or -i), that doesn't
seem like a good enough reason to add -0.  You can see that they exist
by listing with "pax -v" and noting which lines have no mode, user,
group, size, etc. (or just attempt an extraction and see which files
pax fails to extract).

-- 
Geoff Clare <[email protected]>
The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England

  • [1003.1(2008... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: Add... Stephane Chazelas via austin-group-l at The Open Group
      • Re:... Geoff Clare via austin-group-l at The Open Group
        • ... Steffen Nurpmeso via austin-group-l at The Open Group
        • ... Stephane Chazelas via austin-group-l at The Open Group
          • ... Geoff Clare via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
      • Re:... Stephane Chazelas via austin-group-l at The Open Group
        • ... Geoff Clare via austin-group-l at The Open Group
          • ... Stephane Chazelas via austin-group-l at The Open Group

Reply via email to