I want to rename file with weird name to something reasonable, however I'm not able to :/
$ mv *_000c.jpg 000c.jpg
mv: cannot move '?j?Z?R?C1_000c.jpg' to '000c.jpg': No such file or directory
I've tried using inode number as was recommend in few places on the internet:
$ ls -il *000c.jpg
ls: '?j?Z?R?C1_000c.jpg': No such file or directory
213915 -rw-r--r-- 1 wolf wolf 794655 Jul 21 2012 '?j?Z?R?C1_000c.jpg'
$ find . -inum 213915 -print0 | xargs -0 -I '{}' mv '{}' 000c.jpg
mv: cannot move './?j?Z?R?C1_000c.jpg' to '000c.jpg': No such file or directory
What should I do?
ls
in that directory? Is the file shown as a regular file? I am asking to make sure that theNo such file or directory
is a globbing error and not indicative of a damaged file system. – terdon♦ Apr 12 '17 at 13:50fsck
? I may be corrupted. How did the file acquire that name? – Kusalananda♦ Apr 12 '17 at 13:50ls
) – Kusalananda♦ Apr 12 '17 at 13:54?
for letters that it can't display. Try switching to a fully unicode font. – Mioriin Apr 12 '17 at 13:55*_000c.jpg
but thatmv
then can't process the file. This is, IMHO, indicative of a corrupt filesystem. ... or possibly of a filesystem that's mounted on a network share that's gone away (with the directory entries still cached), or something. – Kusalananda♦ Apr 12 '17 at 13:59