Sujet : Re: Case Insensitive File Systems -- Torvalds Hates Them
De : not (at) *nospam* telling.you.invalid (Computer Nerd Kev)
Groupes : comp.os.linux.miscDate : 03. May 2025, 04:23:14
Autres entêtes
Organisation : Ausics - https://newsgroups.ausics.net
Message-ID : <68158c22@news.ausics.net>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i686))
Lawrence D'Oliveiro <
ldo@nz.invalid> wrote:
On 3 May 2025 08:58:14 +1000, Computer Nerd Kev wrote:
Well now it's gone from the bad situation of confusing filename output
to the worse situation of completely different output from different
common command-line programs ...
No, you just get different output options available in the same program,
namely GNU ls.
And completely unstandardised between programs, even the defaults of
the GNU versions of ls and find. So you never know how newlines in
filenames will appear in any one program's output. The only good
solution is if they're never there in the first place, but
unfortunately they are allowed to be.
I see this in GNU Find's documentation:
"-print
True; print the entire file name on the standard output, followed
by a newline. If there is the faintest possibility that one of the
files for which you are searching might contain a newline, you
should use '-print0' instead."
http://www.gnu.org/software/findutils/manual/html_node/find_html/Print-File-Name.htmlSeems that disables converting newlines to '?' and ends results
with null instead.
$ touch 'good?file' good$'\n'file
$ find -print | cat -A
.$
./good?file$
./good$
file$
$ find -print0 | cat -A
.^@./good?file^@./good$
This describes how that's not always a solution. Which points out
how awkward the whole issue of handling newlines in filenames is:
http://www.gnu.org/software/findutils/manual/html_node/find_html/Newline-Handling.html-- __ __#_ < |\| |< _#