I have two somehow corrupt files in my second hard disk of my laptop, which has dual boot Ubuntu 15.04 and Windows 7.

I keep it mounted as a ntfs formatted partition in media. I share this drive with Windows, in the sense that Windows also mounts it all the time and accesses it.

File A was just a .sh file and appears as a directory in the explorer. File B appears as a file although it was originally a directory.


sudo rm -rf fileA

on file A just shows no output at all, not even an error message.

This also shows nothing:

lsattr fileA

For file B, sudo rm -rf also shows nothing, while

lsattr fileB

at least shows this:

lsattr: Invalid argument While reading flags on fileB

My HDD is not executable in fstab. I planned to change this at some point, but I don't know if it will have an effect:

UUID=C666BE3C66BE2D55 /media/santiago/1TBHDD              ntfs    rw,auto,user,fmask=0111,d    mask=0000   0 0

Update 1 My filesystem here is ntfs. Now, fileBs name isResized-or-Shared-Pictures`

This is the output of ls -lQ Resized-or-Shared-Pictures

-rw-rw-rw- 1 root root 272 Sep 14 11:02 "Resized-or-Shared-Pictures"

However, the output of rm -r is:

rm: cannot remove ‘Resized-or-Shared-Pictures’: No such file or directory

  • Please post the output of ls -lQ fileA. Also, what filesystem is this on? – terdon Sep 18 '15 at 15:34
  • The reason you don't get an error message with rm -rf is that -f suppresses them. Try just rm -r, and it might give you a useful message. – Tom Hunt Sep 18 '15 at 15:53
  • Linux only supports the outdated POSIX ACL proposal that was withdrawn in 1997. NTFS however implements modern ACLs with many more features. It thus may be that you just have ACLs on that files that are not understood by Linux as they cannot be converted into the outdated ACL proposal. Can you remove the files on Win-DOS? – schily Sep 18 '15 at 17:07
  • I added an update to my question. Sorry, haven't had time to check if on windows I can delete them. I'll check later tonight. – Santiago Sep 23 '15 at 7:55
  • 1
    ntfs is an odd choice of an operating system on linux, used mostly for compatibility, so the driver may not be very well tested for exceptions (like corrupt files, errors in the metadata and so on). It may even be a problem of character encoding - microsoft stuff doesn't respond well to case sensitivity and unicode (they had two decades, I think they never will).... so post the filenames, there may be something fishy there. – orion Sep 23 '15 at 8:40

Your Answer

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

Browse other questions tagged or ask your own question.