Can't delete files from external hard drive / Input - Output error

5,886

There's nothing wrong with your disk.
Some tool (a Windows ripper?) has taken names off the CD and used them unaltered on your Linux filesystem. These names contain characters that are illegal in filenames, like the slash (/), because that / indicates a directory path. Dealing with the resultant files (which can be created, but are hard to subsequently deal with) becomes an extended exercise in trying to find a quoting mechanism to allow specifying the illegal characters, so you can rename the files without them. Even the file gui will block an attempt to create a name with a slash. However, try to use it to remove the slash, maybe that would work. Other bad charactersto remove are: (, ), [, ], {, }, ', ", ;, and even space. Maybe you'd have better luck renaming the files on a Windows system, since the / does not mean directory there.
If you can rerun the ripper, look for name output options to translate the illegal characters into something else.


To delete the files, run the file manager, which is the filing cabinet on the launch bar. Click on the "Other Locations" in the left side, then click on "Computer" on the right, then select media, then camilo, then... etc. until you see the file you want to delete. Right click on it, and select "move to trash". When you have moved all the files to trash you want to delete, on the desktop, right click on the Trash icon, and select "empty trash".

Share:
5,886

Related videos on Youtube

Camilo Jara
Author by

Camilo Jara

Updated on September 18, 2022

Comments

  • Camilo Jara
    Camilo Jara over 1 year

    I can't delete some files from a external hard drive. This the result i get in the terminal when i try to do it:

    camilo@camilo-S400CA:~$ sudo rm -r '/media/camilo/TOSHIBA EXT/Descargas'
    [sudo] password for camilo: 
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Dragon Ball Z Season 1 BrRip FullHD 1080p Spa Latino, Japanese, English + Sub/14. Princess Snake.mkv.part': No such file or directory
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Dragon Ball Z Season 1 BrRip FullHD 1080p Spa Latino, Japanese, English + Sub/38. Nursing Wounds.mkv.part': Input/output error
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 1997 - Paroles Musicales': Input/output error
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 1956 - Violeta Parra, acompañada de guitarra (Folklore de Chile Vol. II)/13 - Tonada del medio.mp3': Is a directory
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 1956 - Violeta Parra, canto y guitarra (Folklore de Chile Vol. I)/17 - La paloma ingrata.mp3': No such file or directory
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 1971 - Canciones Casa de las Americas': Input/output error
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 2003 - Memoria del cantar popular/05 - Que dirá el santo padre.mp3': No such file or directory
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 2004 - Grandes Exitos': No such file or directory
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Descargas/Violeta Parra - 26 discos/Violeta Parra - 2004 - Puras Cuecas/23 - Aromas.mp3': No such file or directory
    camilo@camilo-S400CA:~$ sudo rm -r '/media/camilo/TOSHIBA EXT/Juegos/Doom'
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Juegos/Doom/Mods/Doom 64/D64RTR_BRIGHTMAPS.PK3': Input/output error
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Juegos/Doom/Mods/Doom 64/D64RTR_CHANGELOG.TXT': Input/output error
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Juegos/Doom/Mods/Doom 64/D64RTR_INSTRUCTIONS.TXT': Input/output error
    rm: cannot remove '/media/camilo/TOSHIBA EXT/Juegos/Doom/Mods/Doom 64/D64RTR_README.TXT': Input/output error
    camilo@camilo-S400CA:~$ 
    

    Apart from these the drive is working ok.

    I tried to run a SMART test to the drive but i was unable to because according to GSmartControl and GnomeDisks the hd does seem to have Smart Control, which is weird because i buyed this thing like two or three months ago.

    Thanks in advance!

    • ubfan1
      ubfan1 about 5 years
      The filesnames are possible, but as you have learned, will cause problems. The slashes are probably the worst, confusing the file with a directory.
    • Camilo Jara
      Camilo Jara about 5 years
      Sorry but i believe i'm not following you. Could you please explain me a little bit more?
    • Rinzwind
      Rinzwind about 5 years
      / inditicates a directory. you need to escape those or add "'s at the front and end of the filename
  • Camilo Jara
    Camilo Jara about 5 years
    Sorry bud, i'm still lost, im really noob to linux and computing in general. I just want to delete this folders, can you please tell what would be the dummie steps in order to do it. Thanks a lot