Is there a way of using NTFS on Linux that follows what Windows would do? Retains the case for display purposes, but acts case insensitive for operations?
Display purposes is something the system is not aware of, it just reads directory entries from the filesystem. So it is not possible both retain the case and ignore it at the same time.
That's because the filesystem implementation cannot know if it's reading the information (via openat()/fstat()
for example) for ls
or, say, for cat
.
Note that although -t lowntfs-3g -o ignore_case
will show lowercase, it will preserve the original case. You can check that with two mount sessions:
Create the filesystem:
# dd if=/dev/zero of=/tmp/ntfs bs=1M count=100
# mkfs.ntfs -F /tmp/ntfs
Now, with ignore_case (and lowercase) create AbC
:
# mount.lowntfs-3g -o ignore_case /tmp/ntfs /mnt
# mkdir /mnt/AbC
# ls /mnt
abc
# umount /mnt
afterwards, umounting and re mounting the same filesystem without case conversion:
# mount.ntfs /tmp/ntfs /mnt
# ls /mnt
AbC
# umount /mnt
What you want to achieve is doable though. Just not, from what I see, with ntfs-3g
current implementation. You could have that behavior (after all Windows does it) with a customized ls
or file explorer. Preloading readdir()
for example also looks like something that might work.