Not able to delete a file even if using sudo command on ubuntu 22.04 LTS
I have a text file
Summary_DataTypes.txt which was created by me earlier. It appears in
lsand vs code. But does not show in the folder even if I do show hidden folder.
I want to delete this file but
sudo rm -f also not able to delete it.
I also tried deleting it with
sudo -s but it did not get delete.
I am getting
Error when getting information for file "fileName" : Input/Outout error.
From the Linux man pages for
unlink(2), the system call behind
- pathname points outside your accessible address space.
- An I/O error occurred.
EIO‘s error string is exactly "Input/output error."
So, I think I can assume that this is more likely a hardware or data corruption issue, instead of anything related to permissions etc.
P.S. (after edit)
I am confident that this is inode corruption now. Best course of action is to unmount the device (or reboot to a rescue drive if it is stored on root) and run fsck.