1
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:

enter image description here enter image description here

Concerning the files with error, I cannot:

  1. delete the file

  2. copy the file

  3. move the file

  4. delete the directory since it is not empty (rm -r [DirectoryName])

  5. Bad files are not shown/listed on either Mac OS nor MS-Windows

I can:

  1. Move the content of the directory (mv) including bad files

  2. Get tab to complete the name of the bad file

Any hint? Either to delete them or to recover them.

  • which distro are we talking about? – infiniteRefactor Mar 27 '16 at 21:33
  • cat /proc/version Linux version 3.12.6 (root@NasX86-12) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) – Tamadite Mar 27 '16 at 21:39
  • 1
    Have you tried unmounting and fsck'ing the filesystem ? – davidgo Mar 28 '16 at 1:45
  • The system runs badblock from the user menu (not e2fsck). Running badblock does not make any difference; I do still have same problem. I will try e2fsck -in two weeks, and see. – Tamadite Mar 28 '16 at 20:43
  • @davidgo: that was the solution to my problem! That is to run e2fsck. Can you please create the according answer so I can score it? – Tamadite Apr 10 '16 at 7:55
2

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.