45

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
  • 78,878

6 Answers6

59

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,932
Bowen Xu
  • 691
15

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

staticd
  • 3,025
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.

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,843