/bin/ls: reading directory .: Input/output error
total 0
The above error indicate that i cannot access to the specific file on Linux, Delete not working. with root user as well.
so the error is not a problem to delete files, it’s a problem about the file system itself and/or an hardware problem, but before announce that it’s hardware issue 🙂 try the below solution :-
Option #1:-
use command dmesg.
(display message or driver message) is a command on most Linux- and Unix-based operating systems that prints the message buffer of the kernel. Read about that command here
Option #2 ( worked for me)
Use Fsck command to detect filesystem error and fix it.
How !!!
- First Umount File system ( that file located ). Using Umount command if it’s not able to un mount the file system use lsof command or fuser to check which user using this filesystem.
- run the fsck -y /dev/……………..
- mount file system again.
Fsck Command here
Cheers
Osama …