1

I have a buch of files on a Linux machine that are using invalid filenames. I tried using the "detox" ultility, as well as convmv and recode, but they keep failing with the error
recode: fopen (Entw�rfe): Invalid argument

Even a simple ls -la yields:

ls: cannot access 'Entw'$'\374''rfe': Invalid argument  
-????????? ? ?       ?    ?            ? 'Entw'$'\374''rfe'

The character is supposed to be an umlaut "ü"

7
  • 1
    Are you sure there isn't a filesystem corruption here? Usually, when files are listed without their properties it's a safe sign of filesystem corruption. You should try fsck on your volume.
    – wazoox
    Feb 7, 2020 at 12:14
  • I have mounted the filesystem containing the file on a FreeBSD for testing, and there I can view the properties with ls -rwx------ 1 myuser adm 22 Feb 6 18:49 Entw?rfe* I still cant use any commands on the file though. Feb 7, 2020 at 12:23
  • What filesystem is this? Could you under FreeBSD use something like mv Entw* Entwürfe ?
    – wazoox
    Feb 7, 2020 at 12:26
  • Yes, using mv under FreeBSD works, the problem is, that those were only testfiles. There are many files with the same naming problem on Linux machines of users, where I dont not have the possibility to move them to a BSD system (as well as privacy concerns, since this is personal data). Feb 7, 2020 at 12:40
  • 1
    What filesystem is this? ext3, ext4, something else?
    – wazoox
    Feb 7, 2020 at 12:43

1 Answer 1

0

It is ls who reports the error. Perhaps some system call gets called with nonsense (that might explain why BSD does't choke, different system calls, different ls code). You might try running that call to ls under strace and see what transpires.

As the comment states, this looks like severe filesystem corruption. Best bet is to copy the partition (or whatever backing store) somewhere, and run diagnostics/filesystem debugging/fixups on that. Perhaps after trying to recover what can be read reliably by using backup sofware or e.g. tar.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .