Deutsch   English   Français   Italiano  
<68158c22@news.ausics.net>

View for Bookmarking (what is this?)
Look up another Usenet article

Message-ID: <68158c22@news.ausics.net>
From: Computer Nerd Kev <not@telling.you.invalid>
Subject: Re: Case Insensitive File Systems -- Torvalds Hates Them
Newsgroups: comp.os.linux.misc
References: <pan$4068a$3910f4f1$8cbecede$9e42905e@linux.rocks> <20250428080014.0000347f@gmail.com> <m79tdsF2bf6U1@mid.individual.net> <20250428111242.00007426@gmail.com> <pan$c046d$e87ef491$a3427b7a$ac576dbc@linux.rocks> <slrn1011nu8.46v.rotflol2@geidiprime.bvh> <vurjl9$2pskn$1@dont-email.me> <slrn1013t50.1aev.rotflol2@geidiprime.bvh> <vAGdnR-Fj9qGS4_1nZ2dnZfqn_udnZ2d@giganews.com> <slrn1016uic.2qk.rotflol2@geidiprime.bvh> <m7hgt7F8mvgU5@mid.individual.net> <6813f997@news.ausics.net> <vv100f$3nhss$1@dont-email.me> <681471b1@news.ausics.net> <vv1uo8$lrj7$3@dont-email.me> <68154e05@news.ausics.net> <vv3lis$273hn$2@dont-email.me>
User-Agent: tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i686))
NNTP-Posting-Host: news.ausics.net
Date: 3 May 2025 13:23:14 +1000
Organization: Ausics - https://newsgroups.ausics.net
Lines: 44
X-Complaints: abuse@ausics.net
Path: ...!weretis.net!feeder9.news.weretis.net!news.bbs.nz!news.ausics.net!not-for-mail
Bytes: 2772

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.html

Seems 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

-- 
__          __
#_ < |\| |< _#