Autor: Didier Kryn Datum: To: dng Betreff: Re: [DNG] slashes in FAT file names
Le 22/12/2018 à 07:24, Rick Moen a écrit : > Quoting Hendrik Boom (hendrik@???):
>
>> I have a 32GiB microSD card an am reying to read it on my Devuan system.
>> I munted it with a simpel mount/dev/sdb1 /nedia/hendrik/
>>
>> It reads almost everything fine, except for a few files whose names
>> contain '/' characters. I can handle the other horribly weird
>> characters in file names -- emacs Rename in the directory
>> editor works just fine. But the names containing '/'s even have
>> emacs stymied.
> Rename them.
>
> 1. 'ls -i' #Gets the inode number.
> 2. 'find . -inum "inode-number-from-ls -i" -exec mv {} "newfilename" \;'
Didn't try (because I haven't such filenames), but wonder how it
would be possible.
1) it is impossible in Linux to modify a file without access
permission, and permissions are not associated to the inode but to the
whole directory tree above.
2) there isn't a function in the C library which permits to change
the name of a file (or open it), except by giving its whole pathname.
Eg. it's not possible to open it from its directory entry.
Therefore I wonder how 'find' would do, unless fopen() accepts the
pathological name, which I doubt of.
Sorry to be so negative. Mount options suggested by others are
probably a better idea.