| Deutsch English Français Italiano |
|
<wwv1psw6ara.fsf@LkoBDZeT.terraraq.uk> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder8.news.weretis.net!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: Richard Kettlewell <invalid@invalid.invalid>
Newsgroups: comp.os.linux.misc,comp.os.linux.advocacy
Subject: Re: Case Insensitive File Systems -- Torvalds Hates Them
Date: Sat, 10 May 2025 11:06:01 +0100
Organization: terraraq NNTP server
Message-ID: <wwv1psw6ara.fsf@LkoBDZeT.terraraq.uk>
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>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="175074"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:NF76zXfhevGAQOI8A53waApbYX4=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
Bytes: 4141
Lines: 62
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, but the logic being
applied is indeed independent of filesystem; it just leads to different
results in different types of filesystem.
(Strictly, it’s a feature of GNU coreutils, but apart from that I think
his point stands.)
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.
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.
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
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.
IMO that’s a bug in mv: you should be able to change letter case in
case-insensitive filesystems using just mv.
--
https://www.greenend.org.uk/rjk/