I have a backup that was copied from Linux (ext4) to an exFAT filesystem. File and directory names that end with a period are inaccessible.
I can (partly) list them, but ls behaves strangely. It prints errors like ls: cannot access '….': No such file or directory, and then prints the file name (with final period included), but reports -????????? for the permissions and ? for user, group, etc. I also can't move, rename, or delete any of the affected files. Using wildcards for the offending . does not work.
This isn't a permissions issue. It might be a filesystem corruption issue, but if it is, it is a systematic one caused by rsync'ing a directory from an ext4 to exFAT filesystem, and affects all files and directories whose name ends in .. The command sudo fsck.exfat -v -p /dev/sd** reports volume clean.
System info
This is a Ubuntu Studio Ubuntu 22.04.1 LTS machine running the 6.2.0-1018-lowlatency kernel.
The exFAT is an external USB drive (WD MyBook). I am mounting it via the system default mount option via the disks graphical user utility.
The output of cat /proc/filesystems includes exfat, indicating kernel support; exfat-fuse is not installed, so it is probably not mounting via fuse.
My questions:
- What is going on here?
- Do these files really exist, or are they ghosts (failed to copy to exFAT for reasons)?
- Can I recover this? I'd like to rename all affected nodes by removing the trailing period.
mount -t fuse.exfat-fuse …) and it allowed filenames ending with a dotcat /proc/filesystemsincludesexfat, indicating kernel support, but I cannot rule out that fuse might be handlingexfatmounting. Thefuseandfusefatpackages are installed. Edit:exfat-fuseis not installed, so presumably it is mounted through the kernel module.exfat-fuseand mounted with the commandsudo mount.exfat-fuse /dev/sd** /media/DRIVENAME. It seems to work now. Must be a bug in the kernel's exFAT support. If you rephrase your comment as an answer, I will accept it.touch n.gave me a file namedn. So yes, there is something fishy with filenames ending with a dot, possibly in your kernel as well. I haven't managed to createn.though, even withrsync(not that I have tried very hard, I admit).