Re: [DNG] slashes in FAT file names

2018-12-24 Thread Didier Kryn
Le 23/12/2018 à 18:16, k...@aspodata.se a écrit : Didier: ...   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. ... man openat man renameat int

Re: [DNG] slashes in FAT file names

2018-12-23 Thread Rick Moen
Quoting Didier Kryn (k...@in2p3.fr): >   Therefore I wonder how 'find' would do, unless fopen() accepts > the pathological name, which I doubt of. I'm pretty sure you're right, because upon reflection and testing 'find . -inum N' returns a relative pathspec. Example: $ cd /tmp /tmp $ ls -i 139

Re: [DNG] slashes in FAT file names

2018-12-23 Thread Olaf Meeuwissen
Hi Karl, k...@aspodata.se writes: > Didier: > ... >> 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. > ... > > man openat > man renameat The

Re: [DNG] slashes in FAT file names

2018-12-23 Thread Eric Pozharski
On Sat, Dec 22, 2018 at 11:13:55AM -0500, Hendrik Boom wrote: > Let me thank everyone for their advice; it looks as if I have enough > ideas to try out now. I'll do that when I'm fully awake an report > back on what worked. *SKIP* > > ls -l lists them like this: > > > > -rw-r--r-- 1 hendrik hen

Re: [DNG] slashes in FAT file names

2018-12-23 Thread karl
Didier: ... >   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. ... man openat man renameat Regards, /Karl Hammar ---

Re: [DNG] slashes in FAT file names

2018-12-23 Thread Didier Kryn
Le 22/12/2018 à 07:24, Rick Moen a écrit : Quoting Hendrik Boom (hend...@topoi.pooq.com): 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 contai

Re: [DNG] slashes in FAT file names

2018-12-23 Thread Hendrik Boom
On Sun, Dec 23, 2018 at 09:45:47AM +0100, Martin Steigerwald wrote: > Hendrik Boom - 23.12.18, 04:15: > > On Sun, Dec 23, 2018 at 02:35:35AM +0100, Gonzalo Pérez de Olaguer > Córdoba wrote: > > > Hi Hendrik, > > > > > > El Sat, 22 Dec 2018 18:20:22 -0500 > > > > > > Hendrik Boom escribió: > > >

Re: [DNG] slashes in FAT file names

2018-12-23 Thread Martin Steigerwald
Hendrik Boom - 23.12.18, 04:15: > On Sun, Dec 23, 2018 at 02:35:35AM +0100, Gonzalo Pérez de Olaguer Córdoba wrote: > > Hi Hendrik, > > > > El Sat, 22 Dec 2018 18:20:22 -0500 > > > > Hendrik Boom escribió: > > > > > > Rename them. > > > > > > > > > > > > 1. 'ls -i' #Gets the inode number. >

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Olaf Meeuwissen
Hi Steve, Steve Litt writes: > On Sat, 22 Dec 2018 02:38:42 -0800 > Rick Moen wrote: > >> Quoting Olaf Meeuwissen (paddy-h...@member.fsf.org): >> >> > On any Unix-like system I've come across the '/' (and '\0') are >> > about the only character that cannot be used in a filename. >> >> That and n

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Olaf Meeuwissen
Hi, Hendrik Boom writes: > hendrik@midwinter:/media/hendrik/FC30-3DA9/Pure disco$ ls -i > ls: cannot access '07/TRA~1.MP3': No such file or directory > ls: cannot access '18/TRA~1.MP3': No such file or directory > 2522 @ 2523 ? 2526 ?? 07/TRA~1.MP3 2516 > 16-TRA~1.M?3

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
On Sun, Dec 23, 2018 at 02:35:35AM +0100, Gonzalo Pérez de Olaguer Córdoba wrote: > Hi Hendrik, > > El Sat, 22 Dec 2018 18:20:22 -0500 > Hendrik Boom escribió: > > > > > > Rename them. > > > > > > > > > > 1. 'ls -i' #Gets the inode number. > > > > > 2. 'find . -inum "inode-number-from-ls -

Re: [DNG] slashes in FAT file names

2018-12-22 Thread karl
Gonzalo: > Hi Hendrik, > El Sat, 22 Dec 2018 18:20:22 -0500 > Hendrik Boom escribió: > > > > > Rename them. > > > > > > > > > > 1. 'ls -i' #Gets the inode number. > > > > > 2. 'find . -inum "inode-number-from-ls -i" -exec mv {} "newfilename" > > > > > \;' > > Yes, I see inode numbers. Unfor

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
On Sun, Dec 23, 2018 at 02:35:35AM +0100, Gonzalo Pérez de Olaguer Córdoba wrote: > Hi Hendrik, > > El Sat, 22 Dec 2018 18:20:22 -0500 > Hendrik Boom escribió: > > > > > > Rename them. > > > > > > > > > > 1. 'ls -i' #Gets the inode number. > > > > > 2. 'find . -inum "inode-number-from-ls -

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Gonzalo Pérez de Olaguer Córdoba
Hi Hendrik, El Sat, 22 Dec 2018 18:20:22 -0500 Hendrik Boom escribió: > > > > Rename them. > > > > > > > > 1. 'ls -i' #Gets the inode number. > > > > 2. 'find . -inum "inode-number-from-ls -i" -exec mv {} "newfilename" > > > > \;' > > > > > > Yes, I see inode numbers. Unfortunately, the

Re: [DNG] slashes in FAT file names

2018-12-22 Thread karl
Hendrik: > On Sat, Dec 22, 2018 at 02:42:13PM -0800, Rick Moen wrote: > > Quoting Hendrik Boom (hend...@topoi.pooq.com): > > > On Fri, Dec 21, 2018 at 10:24:24PM -0800, Rick Moen wrote: ... > > > > Rename them. > > > > > > > > 1. 'ls -i' #Gets the inode number. > > > > 2. 'find . -inum "inode-

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Rick Moen
Quoting Hendrik Boom (hend...@topoi.pooq.com): > Yes, I see inode numbers. Unfortunately, the files with slashes in > their names have question marks for their inode numbers. [snip] Wow, that's meshugge. ;-> Perhaps some lateral thinking will help. What about booting a FreeDOS v. 1.2 image,

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
On Sat, Dec 22, 2018 at 02:42:13PM -0800, Rick Moen wrote: > Quoting Hendrik Boom (hend...@topoi.pooq.com): > > > On Fri, Dec 21, 2018 at 10:24:24PM -0800, Rick Moen wrote: > > > Quoting Hendrik Boom (hend...@topoi.pooq.com): > > > > > > > I have a 32GiB microSD card an am reying to read it on my

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Rick Moen
Quoting Hendrik Boom (hend...@topoi.pooq.com): > On Fri, Dec 21, 2018 at 10:24:24PM -0800, Rick Moen wrote: > > Quoting Hendrik Boom (hend...@topoi.pooq.com): > > > > > 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/

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Steve Litt
On Sat, 22 Dec 2018 02:38:42 -0800 Rick Moen wrote: > Quoting Olaf Meeuwissen (paddy-h...@member.fsf.org): > > > On any Unix-like system I've come across the '/' (and '\0') are > > about the only character that cannot be used in a filename. > > That and null are the only disallowed characte

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
Let me thank everyone for their advice; it looks as if I have enough ideas to try out now. I'll do that when I'm fully awake an report back on what worked. -- hendrik On Fri, Dec 21, 2018 at 10:23:14PM -0500, Hendrik Boom wrote: > I have a 32GiB microSD card an am reying to read it on my Devu

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
On Sat, Dec 22, 2018 at 11:37:32AM +, Adam Sampson via Dng wrote: > Hendrik Boom writes: > > > -? ? ? ? ?? 07/TRA~1.MP3 > > As others have said, / isn't a valid character in Windows filenames, so > finding a Windows machine probably won't help (perhaps t

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
On Sat, Dec 22, 2018 at 10:37:44AM +, marc wrote: > Hello: > > > -? ? ? ? ?? 07/TRA~1.MP3 > > > With the slash, it can't even figure out the permissions, ownership, or > > file size. Preumably some parts of the system interpret the '/' as the > > direc

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
On Sat, Dec 22, 2018 at 05:15:55PM +0900, Olaf Meeuwissen wrote: > Hi Hendrik, > > Hendrik Boom writes: > > > 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/ > > You might want to try adding a suitable mount o

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
On Fri, Dec 21, 2018 at 10:24:24PM -0800, Rick Moen wrote: > Quoting Hendrik Boom (hend...@topoi.pooq.com): > > > 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

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Hendrik Boom
On Fri, Dec 21, 2018 at 10:00:00PM -0600, goli...@dyne.org wrote: > On 2018-12-21 21:23, Hendrik Boom wrote: > > > > Does anyone have any ideas here other than begging, borrowing, or > > buying a Windows system? > > > > -- hendrik > > > > ___ > > > >

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Martin Steigerwald
Hello Hendrik, Hendrik Boom - 22.12.18, 04:23: > ls -l lists them like this: > > -rw-r--r-- 1 hendrik hendrik 0 Sep 1 2007 06 - Track 6.mq3 > -? ? ? ? ?? 07/TRA~1.MP3 instead of useful metadata can be a sign of filesystem corruption. There migh

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Adam Sampson via Dng
Hendrik Boom writes: > -? ? ? ? ?? 07/TRA~1.MP3 As others have said, / isn't a valid character in Windows filenames, so finding a Windows machine probably won't help (perhaps this is just a very unlucky random bitflip, or it was written on some embedded devi

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Rick Moen
Quoting Olaf Meeuwissen (paddy-h...@member.fsf.org): > On any Unix-like system I've come across the '/' (and '\0') are about > the only character that cannot be used in a filename. That and null are the only disallowed characters. It's in the Single Unix Specification. http://pubs.opengroup.or

Re: [DNG] slashes in FAT file names

2018-12-22 Thread marc
Hello: > -? ? ? ? ?? 07/TRA~1.MP3 > With the slash, it can't even figure out the permissions, ownership, or > file size. Preumably some parts of the system interpret the '/' as the > directory name separator, and in this file system that's not what it > i

Re: [DNG] slashes in FAT file names

2018-12-22 Thread Olaf Meeuwissen
Hi Hendrik, Hendrik Boom writes: > 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/ You might want to try adding a suitable mount option there. Not sure if it's mounted as FAT or VFAT or whatever, but scour the

Re: [DNG] slashes in FAT file names

2018-12-21 Thread rainerh
Hendrik Boom schrieb am Sa 22 Dez 2018 04:23:14 CET: Does anyone have any ideas here other than begging, borrowing, or buying a Windows system? The forward slash isn't allowed in filenames on Windows too: https://docs.microsoft.com/de-de/windows/desktop/FileIO/naming-a-file#naming-convention

Re: [DNG] slashes in FAT file names

2018-12-21 Thread Rick Moen
Quoting Hendrik Boom (hend...@topoi.pooq.com): > 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 th

Re: [DNG] slashes in FAT file names

2018-12-21 Thread golinux
On 2018-12-21 21:23, Hendrik Boom wrote: Does anyone have any ideas here other than begging, borrowing, or buying a Windows system? -- hendrik ___ Don't use / in filenames. I thought it was a no-no. Yes it is: "File names in Linux can contain a

[DNG] slashes in FAT file names

2018-12-21 Thread Hendrik Boom
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