File system ext4 //
which ls -> /bin/ls //
Bash -> 3.2.57(2)-release //
whoami -> admin
If I run ls
then I firstly get a list of files with error
"No such file or directory"
and then the healthy files of the directory.
The folder that contains these bad files has an unusual size:
Concerning the files with error, I cannot:
-
delete the file
-
copy the file
-
move the file
-
delete the directory since it is not empty (
rm -r [DirectoryName]
) -
Bad files are not shown/listed on either Mac OS nor MS-Windows
I can:
-
Move the content of the directory (
mv
) including bad files -
Get tab to complete the name of the bad file
Any hint? Either to delete them or to recover them.
Best Answer
As per comment - the solution was to unmount and fsck the filesystem (using e2fsck or fsck.ext4).
It would seem that the filesystem got corrupted - possibly due to a sudden outage while writing to the disk - and the filesystem would have detected the problem and locked itself until repaired to prevent further damage to itself.