On Thu, 2022-11-10 at 07:03 -0500, Greg Wooledge wrote: > On Thu, Nov 10, 2022 at 05:54:00AM +0100, hw wrote: > > ls -la > > insgesamt 5 > > drwxr-xr-x 3 namefoo namefoo 3 16. Aug 22:36 . > > drwxr-xr-x 24 root root 4096 1. Nov 2017 .. > > drwxr-xr-x 2 namefoo namefoo 2 21. Jan 2020 ? > > namefoo@host /srv/datadir $ ls -la '?' > > ls: Zugriff auf ? nicht möglich: Datei oder Verzeichnis nicht gefunden > > namefoo@host /srv/datadir $ > > > > > > This directory named ? appeared on a ZFS volume for no reason and I can't > > access > > it and can't delete it. A scrub doesn't repair it. It doesn't seem to do > > any > > harm yet, but it's annoying. > > > > Any idea how to fix that? > > ls -la might not be showing you the true name. Try this: > > printf %s * | hd > > That should give you a hex dump of the bytes in the actual filename.
good idea: printf %s * | hexdump 0000000 77c2 6861 0074 0000005 > If you misrepresented the situation, and there's actually more than one > file in this directory, then use something like this instead: > > shopt -s failglob > printf '%s\0' ? | hd shopt -s failglob printf '%s\0' ? | hexdump 0000000 00c2 0000002 > Note that the ? is *not* quoted here, because we want it to match any > one-character filename, no matter what that character actually is. If > this doesn't work, try ?? or * as the glob, until you manage to find it. printf '%s\0' ?? | hexdump -bash: Keine Entsprechung: ?? (meaning something like "no equivalent") printf '%s\0' * | hexdump 0000000 00c2 6177 7468 0000 0000007 > If it turns out that '?' really is the filename, then it becomes a ZFS > issue with which I can't help. I would think it is. Is it? perl -e 'print chr(0xc2) . "\n"' ... prints a blank line. What's 0xc2? I guess that should be UTF8 ... printf %s * aht What would you expect it to print after shopt?