41

Some file is in my NTFS file system which I can't delete. It's giving this error:

rm: cannot remove `zigBqC04': Input/output error

Any other files also could not be copied in that folder and showing error message as:

Error opening file 'file-path': Input/output error

Any solution.

Thomas Ward
  • 74,764
unknown_boundaries
  • 513
  • 1
  • 4
  • 5

6 Answers6

54

I had the same issue, and I wanted to delete the directory. So I tried to use rm -rf XXX and also Shift + Delete to remove but both failed because of the same error.

I was able to delete the directory by right clicking the directory, choosing Move to Trash and then Empty Trash.

Esther
  • 3,600
  • 13
  • 29
Bowen Xu
  • 641
15

Looks like the filesystem has some errors on it. Do full scandisk /checkdisk from windows. (scan disk for errors)

staticd
  • 2,965
  • 2
  • 17
  • 19
  • That's probably the best one can do without damaging the proprietary filesystem or replacing the filesystem. – LiveWireBT Jul 28 '13 at 10:30
  • 3
    @staticd As of 2019, is this still the best solution? I'm using the latest version of KDE, and am more interested in a *buntu specific solution. – Sarah Szabo Jan 04 '19 at 07:58
  • 2
    'scandisk' is not recognized as internal or external command, operable program or batch file did you mean CHKDSK perhaps? – Klesun Dec 18 '19 at 12:52
  • Windows checkdisk has the bad habit of deleting/hiding files and folders that seem erroneous in Windows but not in Linux – cipricus Apr 07 '20 at 12:51
3

A workaround that thankfully worked for me was to plug the drive into a Windows system and delete the offending files and folders using Shift + Delete (immediate delete without Recycle Bin).

After that, the issue seemed to be resolved when the drive was returned to Ubuntu.

2

I'm on PopOS. It happened to me when I unplugged the external disk before letting the OS flush. I could fix this issue by opening the GUI file manager -> right-click -> delete the parent folder. This time GUI was smarter.

Lajos
  • 121
2

If it is an NTFS or FAT file system and you don't have access to Windows just copy the files that you want to keep from the USB drive onto your hard drive. Then format the USB drive again using GPARTED or similar partition manager to NTFS or FAT. Followed by copying all the files back onto the USB drive. Worked for me.

Jacques MALAPRADE
  • 945
  • 4
  • 17
  • 35
0

may need to be logged in a root to do this. If so, type:

sudo su

in to Terminal and navigate with terminal to where zigBqC04 is and rm <filename> to remove files or rmdir <dir> to delete folders replace <---> with the file or folder name. Wild cards ( & ?) can be used.*

Simon
  • 4,813
  • 8
  • 35
  • 52