Linux ошибка ввода вывода при удалении файлов

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's user avatar

Thomas Ward

72.7k30 gold badges173 silver badges237 bronze badges

asked Jul 27, 2013 at 15:54

unknown_boundaries's user avatar

2

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's user avatar

Esther

3,21011 silver badges24 bronze badges

answered Feb 22, 2019 at 7:04

Bowen Xu's user avatar

8

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

answered Jul 28, 2013 at 10:03

staticd's user avatar

staticdstaticd

2,9352 gold badges16 silver badges19 bronze badges

4

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.

answered Dec 18, 2018 at 4:55

Shaun of the Dead's user avatar

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.

answered Sep 3, 2017 at 18:13

Jacques MALAPRADE's user avatar

1

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.

answered Oct 26, 2021 at 21:22

Lajos's user avatar

LajosLajos

1113 bronze badges

2

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.*

answered Jul 27, 2013 at 16:03

SimplySimon's user avatar

SimplySimonSimplySimon

4,7938 gold badges34 silver badges52 bronze badges

1

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

I just wanted to share my experience: on FreeBSD 10.3, I mounted my external hard drive with

$ sudo ntfs-3g /dev/da0s1 /media

Inside the hard drive, I did a mkdir to create a directory and then moved some files to it, of course with mv command. Finally I did the following command:

$ sudo sync

Then I mounted the hard drive on a Linux machine with kernel 4.4.0-78-generic. Now When I list the contents of the hard drive, the directory created on FreeBSD, named Jeff, is shown like below:

$ ls -lhrtci
ls: cannot access 'Jeff': Input/output error
total 20K
  ? d????????? ? ?    ?       ?            ? Jeff

enter image description here

Also, when trying to remove the Jeff directory, I receive the following error message:

$ sudo rm -f -R Jeff
rm: cannot remove 'Jeff': Input/output error

enter image description here

I couldn’t get rid of Jeff directory on Linux machine, therefore I used the FreeBSD machine and re-mounted the hard drive on FreeBSD again. But the ls, cd and rm commands on FreeBSD generate the same Input/output error. Looks like there has been a bug on FreeBSD ntfs-3g package.


UPDATE

I moved all my data from external hard drive to a Linux machine, of course the corrupt file Jeff couldn’t be moved due to I/O error. Then I reformatted the external hard drive with both zeroing of the volume and bad sector checking like this:

$ sudo mkfs.ntfs /dev/sdb1

And then moved all the data back to the external volume. This way, I lost the corrupt file named Jeff, however, my external hard drive is clean of any I/O error.

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's user avatar

Thomas Ward

72.7k30 gold badges173 silver badges237 bronze badges

asked Jul 27, 2013 at 15:54

unknown_boundaries's user avatar

2

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's user avatar

Esther

3,21011 silver badges24 bronze badges

answered Feb 22, 2019 at 7:04

Bowen Xu's user avatar

8

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

answered Jul 28, 2013 at 10:03

staticd's user avatar

staticdstaticd

2,9352 gold badges16 silver badges19 bronze badges

4

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.

answered Dec 18, 2018 at 4:55

Shaun of the Dead's user avatar

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.

answered Sep 3, 2017 at 18:13

Jacques MALAPRADE's user avatar

1

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.

answered Oct 26, 2021 at 21:22

Lajos's user avatar

LajosLajos

1113 bronze badges

2

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.*

answered Jul 27, 2013 at 16:03

SimplySimon's user avatar

SimplySimonSimplySimon

4,7938 gold badges34 silver badges52 bronze badges

1

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

NTFS: Input/output error

I was experimenting with HDF5 installation from a permanently mounted NTFS data partition so lots of deletion etc. Now part of the folder (containing some codes etc.) is not deleting and showing the above error. I have already NTFS-3g etc. but only have windows on virtualbox (from which also can not delete).
Thanks for all the help!

I am on CentOS 7.

Vlastimil Burián's user avatar

asked Jun 28, 2016 at 4:30

ankhi's user avatar

4

This means your filesystem is damaged, Input/Output errors during filesystem access attempts generally mean hardware issues.

Type dmesg and check for log. it might be because of connection to it is failing, it’ll be noted there.

is it mounting it via ntfs or ntfs-3g ? As I recall, the legacy ntfs driver had no stable write support and was largely abandoned when it turned out ntfs-3g was significantly more stable and secure.

answered Jun 28, 2016 at 4:38

AReddy's user avatar

AReddyAReddy

3,1225 gold badges35 silver badges75 bronze badges

3

I meet the same problem,too.Some topics tell me that I should mount this disk on Win and rm it and clean the trash.I tried but failed.

But,I rm this files parent folder (on Linux rm -rf xxx ),and solved this problem.

U can try this way but remember to copy the import files or folders in parent folder.

answered Apr 14 at 6:21

Ubuntusr1342's user avatar

Read about mount / umount (man pages)

In my case directory had be to unmount first, to be eligible to be deleted itself or its subdirectories/files

sudo umount -f /media/sami/OS\somewindows_folder

Then simply sudo rm -rf /media/sami/OS\somewindows_folder worked for me

Vlastimil Burián's user avatar

answered Jul 21, 2022 at 13:53

Sami's user avatar

SamiSami

1074 bronze badges

1

You must log in to answer this question.

Not the answer you’re looking for? Browse other questions tagged

.

В первый раз столкнулся с такой проблемой: не удаляются папки с скрытыми (нечитаемыми символами в имени) файлами. Испробованы разные методы и прерыт весь интернет безрезультатно. inode папок известен но не нашёл инструмента который их может «зачистить» нащёл только для файлов (но имя файлов не читаемое) файлы определяются но их inode нет. На диске 1.3 Tb информации поэтому копировать/форматировать/копировать не предлагать, тем более интересно найти решение. В сети на аналогичные проблемы вменяемого ответа не нашёл. Как эти файлы там оказались тоже не расскажу очень мана долго выйдет. Последнее что пробовалось (от отчаяния) это BleachBit под root «удаление каталогов (безвозвратно)», не удаляет и выводит errors при этом меняет имя дирректории оставляя эти скрытые файлы там. Думаю если кто знает как по inode затереть непосредственно на диске этот каталог то это и будет решение. fsck.ext4 не предлогать — не помогает.

# fsck.ext4 -f /dev/sde1
e2fsck 1.42.5 (29-Jul-2012)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
ext4b1800: 2737/122101760 files (0.7% non-contiguous), 344721312/488378368 blocks

SMART у диска хороший, диску нет и года, битых секторов/блоков нет.
После очередной попытки удалить папку, при загрузке система его автоматически проверяет на ошибки но их не находит.



Иногда помогал live cd, причем не дебиан, и не бликоподобные ему.  Заходил «из вне» и удалял.

Не даст поколебаться Он ноге твоей, и не воздремлет хранящий тебя…


Цитата: oermolaev от 08 декабря 2015, 19:29:40переименовать пробовали?

Файлы видны только из консоли и не переименовываются, при любой попытке связанной с их записью/перезаписью выходит «Ошибка ввода/вывода». Папки — директории в которых они находятся переименовываются но толку от этого никакого.

Цитата: vovan—vovan от 08 декабря 2015, 20:51:42Иногда помогал live cd

Пробовал, с тем-же результатом, попробую ещё PartedMagic может там что есть интересное. Уже пробовал Slax.
Предполагаю что мог бы помочь какойто «Hex» редактор в котором можно по inode на диске что надо занулить. Подобный редактор есть в R-Studio но в LiveCD опция редактирования у меня почемуто не активна, может по лицензионным соображениям. 


Cообщение объединено 09 декабря 2015, 09:00:00


Цитата: Aalexeey от 09 декабря 2015, 08:19:52редактор есть в R-Studio но в LiveCD опция редактирования у меня почемуто не активна

Скачал

Demo версию там есть RStudio3_i386.deb и RStudio3_x64.deb

(не надо, полная версия ниже), оказалось запись нужно/можно разрешить в настройках, после сканирования не полного я его прервал, выбрал нужные папки — дирректорию, забил их нулями и сохранил. После этого папки оказались пустыми и удалились.
Вот такая б… «египетская сила». Если кто сталкивался с аналогичным GUI/полуGUI свободно — бесплатным редактором под Linux работающим с ext4 отпишитесь.
Есть ещё R-Linux как пишут на сайте «Бесплатная полнофункциональная утилита для восстановления данных на файловых системах Ext2/Ext3/Ext4, используемых в Linux» пакеты rli_en_5_i386.deb и rli_en_5_amd64.deb, вроде как то-же самое насколько полнофункциональное не проверял ещё, русский язык есть.


Cообщение объединено 09 декабря 2015, 09:48:05


После всех манипуляций и перезагрузки (fsck видимо заметило что папки безследно исчезли) пришлось сделать это:

# fsck.ext4 -f /dev/sde1
e2fsck 1.42.5 (29-Jul-2012)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Missing '..' in directory inode 524304.
Fix<y>? yes
Setting filetype for entry '..' in ... (524304) to 2.
Missing '..' in directory inode 524305.
Fix<y>? yes
Setting filetype for entry '..' in ... (524305) to 2.
Missing '..' in directory inode 524311.
Fix<y>? yes
Setting filetype for entry '..' in ... (524311) to 2.
Missing '..' in directory inode 524319.
Fix<y>? yes
Setting filetype for entry '..' in ... (524319) to 2.
Pass 3: Checking directory connectivity
Unconnected directory inode 524304 (/???)
Connect to /lost+found<y>? yes
Unconnected directory inode 524305 (/???)
Connect to /lost+found<y>? yes
Unconnected directory inode 524311 (/???)
Connect to /lost+found<y>? yes
Unconnected directory inode 524319 (/???)
Connect to /lost+found<y>? yes
Pass 4: Checking reference counts
Inode 2 ref count is 2, should be 6.  Fix<y>? yes
Inode 524304 ref count is 3, should be 2.  Fix<y>? yes
Inode 524305 ref count is 3, should be 2.  Fix<y>? yes
Inode 524311 ref count is 3, should be 2.  Fix<y>? yes
Inode 524319 ref count is 3, should be 2.  Fix<y>? yes
Pass 5: Checking group summary information

ext4b1800: ***** FILE SYSTEM WAS MODIFIED *****
ext4b1800: 2736/122101760 files (0.7% non-contiguous), 344721311/488378368 blocks
#


Папки с файлами пока ;D не появились. Я так думаю увивило оно их отсутствие из журнала но т.к. они физически затёрты нулями то и востанавливать нечего и упоминание о них было удалено/исправленно!


Aalexeey, вывод? Всё таки помогло fsck?


Цитата: oermolaev от 09 декабря 2015, 10:15:23Всё таки помогло fsck?

Нет никак не помогло, оно видило ошибки но никак не могло их исправить. В последнем случае оно просто заметило отсутствие занулённых мной папок и файлов, сделало что сделало но уже было поздно  ::). Просто согласилось «ооо нам и без этих папок хорошо»  :P.


А почему никто (или мало кто), как я вижу, xfs не использует? Я один такой умный? ;D Лет десять, однако, полёт нормальный, на нескольких машинах, бывало всякое насчёт аварийных отключений/перезагрузок — и хоть бы раз хоть бы что ;D Для дома как минимум самое то, ни забот ни хлопот.


Цитата: yoric от 09 декабря 2015, 11:57:17почему никто (или мало кто), как я вижу, xfs не использует?

Незнаю как у других но у меня причинами были: невозможность уменишить раздел при необходимости (такие необходимости у меня периодически возникали), отсутствие вменяемой софтины под винду для доступа к xfs (под ext4 это прекрасная Ext2Fsd), фрагментация и необходимость хоть и не часто её устранять (но GUI то нет).


Цитата: yoric от 09 декабря 2015, 11:57:17
А почему никто (или мало кто), как я вижу, xfs не использует? Я один такой умный? ;D Лет десять, однако, полёт нормальный, на нескольких машинах, бывало всякое насчёт аварийных отключений/перезагрузок — и хоть бы раз хоть бы что ;D Для дома как минимум самое то, ни забот ни хлопот.

я широко использую xfs для разделов с пользовательскими данными. А проблемы можно заполучить на любой файловой системе.

Цитата: Aalexeey от 09 декабря 2015, 12:05:03фрагментация

дефрагментация




Подумаешь, три буквы набрать. Это не raid или LVM настроить.

А вообще я лично удивлён, и не думал про фрагментацию на XFS, по аналогии с EXT, как раньше писали. Сейчас посмотрю ради интереса, домашней у меня лет 6, а на работе лет 10 уже как стоит и про дефрагментацию знать не знает ;D

Которой 10 лет, на /boot около 15%, на всех других менее 5%. Дома один раздел, 6 лет, фрагментация 5%. Не так страшен чёрт, как его малюют ;D


Понравилась статья? Поделить с друзьями:
  • Linux ошибка kernel
  • Linux отключить вывод ошибок
  • Linux логи ошибок диска
  • Linux канал ошибок
  • Linux как проверить диск на ошибки