while creating a backup of a Windows PC I encountered an odd File. I first discovered it while copying the parent backup where exactly the same error came up.

Note that I masked all [A-Za-z0-9] with a X for the customers privacy.

Output of ls:

ls: cannot access 'XXX XXXXX XXXX  XX XXX XXXX?(XXXXXX XXXXXX).mp4': No such file or directory
[Other Files in Folder]

Output of ls -l:

-????????? ? ?    ?           ?            ? XXX XXXXX XXXX  XX XXX XXXX?(XXXXXX XXXXXX).mp4

What I've already tried:

sudo ls
file [Filename]
sudo chmod 777 [Filename]
sudo mv *.mp4 foo.mp4
sudo ls -l

Now I've run out of ideas and hope you can help.

UPDATE: Windows can't do anything with the file either (File not found)

I also tried to see the hex representations of the name but I only get the usual ascii values.

  • "while creating a backup of a Windows PC I encountered an odd File. " I would advice to use windows tools for problems related to windows filesystems. The filename might make sense for Windows and not for Linux. Mind that it is custom to try auto complete with tabs to make Linux take into account special characters. Or to encluse the filename with quotes. Warning: if this is caused by filesystem problems on the Windows PC you will make things worse. I would use the generic windows tools to have windows have a 1st attempt at this. – Rinzwind May 15 '18 at 13:24
  • It doesn't... I should probably edited that in. Windows doesn't find the path bit displays the file with its supposedly correct size (about 700M) and everything I know about Powershell and Bash for Windows doesn't work either – poldi1405 May 15 '18 at 13:28
  • Is the external disk formatted as FAT? How many characters is the length of filename including its subdirectories? For example if it's: /path/to/the/file/music.mp3 it would be 19 (or 23 if slashes are counted). I'm asking because there's a character limit on filenames of 255 on FAT disks. If you go over that, your files will break. – Dan May 15 '18 at 13:58
  • @Dan it's NTFS so path length isn't much of a problem – poldi1405 May 15 '18 at 14:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.