Deutsch   English   Français   Italiano  
<681f3663$0$5184$426a74cc@news.free.fr>

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

Path: ...!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-b.proxad.net!nnrp1-1.free.fr!not-for-mail
Newsgroups: comp.os.linux.misc,comp.os.linux.advocacy
From: =?UTF-8?Q?St=C3=A9phane?= CARPENTIER <sc@fiat-linux.fr>
Subject: Re: Case Insensitive File Systems -- Torvalds Hates Them
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>
 <20250429201119.736dc05c@blackbird.dehmel-lan.de>
 <pan$26cf9$ed710c82$1bdd3879$1503edcb@linux.rocks>
 <20250430210913.7e2f0782@blackbird.dehmel-lan.de>
 <6815278d$0$12946$426a34cc@news.free.fr> <vv3m8c$273hn$3@dont-email.me>
 <vv512b$3g7ee$1@dont-email.me> <vv53ja$3gvjn$2@dont-email.me>
 <wwvmsbkeu7x.fsf@LkoBDZeT.terraraq.uk> <vvn3ue$3eka1$1@dont-email.me>
 <wwv1psw6ara.fsf@LkoBDZeT.terraraq.uk>
Organization: Mulots' Killer
User-Agent: slrn/pre1.0.4-9 (Linux)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Date: 10 May 2025 11:20:03 GMT
Lines: 101
Message-ID: <681f3663$0$5184$426a74cc@news.free.fr>
NNTP-Posting-Date: 10 May 2025 13:20:03 CEST
NNTP-Posting-Host: 78.201.248.7
X-Trace: 1746876003 news-2.free.fr 5184 78.201.248.7:44714
X-Complaints-To: abuse@proxad.net
Bytes: 5373

Le 10-05-2025, Richard Kettlewell <invalid@invalid.invalid> a écrit :
> The Natural Philosopher <tnp@invalid.invalid> writes:
>
>> On 10/05/2025 09:38, Richard Kettlewell wrote:
>>> The Natural Philosopher <tnp@invalid.invalid> writes:
>>>> On 03/05/2025 13:09, Chris Ahlstrom wrote:
>>>>> Lawrence D'Oliveiro wrote this post while blinking in Morse code:
>>>>>>       ldo@theon:caseinsens-try> touch try.dat
>>>>>>       ldo@theon:caseinsens-try> ls -l
>>>>>>       total 0
>>>>>>       -rw-r--r-- 1 ldo users 0 May  3 11:57 try.dat
>>>>>>       ldo@theon:caseinsens-try> mv try.dat TRY.DAT
>>>>>>       mv: 'try.dat' and 'TRY.DAT' are the same file
>>>>>>
>>>>>> I guess Linux isn’t any better ...
>>>>> It works on my Linux box (Debian Sid).
>>>>> Heh heh:
>>>>>
>>>> And mine (Mint 22)
>>> I would guess that you’re doing the test on a case-dependent
>>> filesystem?  With vfat and 9p (to NTFS, in WSL) the behavior is as
>>> Lawrence describes.
>>> 
>> Lawrence said it was a feature of Linux, not of the file system in use
>
> The context was case-insensitive filesystems,

Yep.

> but the logic being
> applied is indeed independent of filesystem; it just leads to different
> results in different types of filesystem.

Not exactly. In extfs4 you can choose if you want to have case
sensitivity or not.

> (Strictly, it’s a feature of GNU coreutils, 

For some file systems, not for others.

> but apart from that I think his point stands.)

I disagree with that because he changes the point.

> First, the Linux rename() syscall has no trouble with renames to the
> ‘same’ name (with or without a case change and in both case-insensitive
> and case-sensitive filesystems). So in that sense Linux copes with the
> situation just fine.

OK, so he's wrong.

> In fact so does Windows, both via explorer and ren; I don’t know what
> behavior the poster before Lawrence was experiencing but there doesn’t
> seem to be a problem today.

I am the poster before Lawrence, so I know what my point was.

When I have a file in lowercase in Windows and I want to put an
uppercase, I can't. It's a long time I checked it, maybe things have
changed since then. With Linux, I have no issue.

Then, Lawrence changed the behavior of Linux file system to switch to
insensitive case and says: Linux is no better. But the fact that, by
default, Linux have only insensitive case when Windows has only
sensitive case tells a lot.

> However, we’re not using (just) rename() here. coreutils’s mv does quite
> a lot of work for a superficially simple rename but the relevant part
> here is that it explicitly checks whether source and destination are the
> same file and refuses to rename in that situation. The situation also
> arises if you use hard links:
>
>     $ touch a
>     $ ln a b
>     $ mv a b
>     mv: 'a' and 'b' are the same file

It's something else.

> So that’s the sense in which it’s a feature of Linux (strictly: of
> coreutils). The behavior in case-insensitive filesystems follows, since
> in a case-insensitive filesystem, try.dat and TRY.DAT are two names for
> the same file.

Yep.

> IMO that’s a bug in mv: you should be able to change letter case in
> case-insensitive filesystems using just mv.

Almost agreed. I'd say that it's an unimplemented feature. As by default
Linux file systems where all case insensitive, there was no need for
that. If use mv to change the name of a file with the same name, it will
change some metadata on the file system. There is already touch for
that. I'm not saying it shouldn't be done, I'm saying there are side
effects to consider. So, using mv to change the case of a filename would
be normal, but would need to be done correctly. That's why, for me it's
not a bug but an unimplemented feature.

-- 
Si vous avez du temps à perdre :
https://scarpet42.gitlab.io