I have several files with encoding issues in their file names (German umlauts, burned on CD with Windows, read by Windows and synced to Linux with Seafile. Something, somewhere went wrong...).
Bash and zsh only show "?" instead of umlauts, stat
shows something like
$ stat Erg�nzung.doc
File: ‘Erg\344nzung.doc’
Size: 2609152 Blocks: 5096 IO Block: 4096 regular file
Device: 806h/2054d Inode: 12321475 Links: 1
I can enter the filename only with autocompletion. How do I rename the file? The affected files seem to be unreadable by LibreOffice (or other programs for other file types), they complain about "No such file or device".
I was thinking about mv --by-inode 12321475 Ergänzung.doc
, but there's no --by-inode
switch for mv
. What else can I do?
stat
; just do the same withmv
. – psusi Oct 11 '15 at 13:37find -inum
-way is more reliable/easier if there are multiple files with the same prefix. – Jasper Oct 11 '15 at 13:59mv Erg<tab> Ergnzung.doc
? – user253751 Oct 12 '15 at 00:01