I have a "stubborn" file on an NTFS partition which refuses to be deleted.
A little background on the problem...
Problem happened when I was running Zim on my Linux and the system froze due to some reason. Now, Zim had a page open at that time which was being edited. Zim is a notebook wiki which stores its data in plain text files. Each page of zim is stored in a text file. Hence there was some file which was open at that time on the filesystem.
I rebooted using the power switch, and when I opened Zim and tried editing the page it was unable to save that page and instead created a backup file for that page by the name
myNote.txt.zim-new~. Now, when I try to delete this file, it says:
rm: cannot remove ‘myNote.txt.zim-new~’: No such file or directory
My hunch is that Zim moved the original file being edited to this backup file and created a new file. So, this backup file is the original which got corrupt.
The thing is that I can read this file perfectly fine, but renaming it or deleting it or even moving to trash is not working. I also tried deleting with root.
So far after researching a bit, I found that it might have got something to do with the special character in the name of this file. Or maybe the file has just got corrupted in some weird way. And the solutions people are suggesting is using
chkdsk in Windows.
But the problem is that I don't have Windows. So, how are people fixing such errors?
I tried using
testdisk but they reported the partition to be okay.
I created a new file with very similar name and it gets deleted/renamed/moved to trash very easily.
That folder is synchronized with Dropbox, if that's any help.
PS: I have an ntfs partition on a Linux-only box because I was thinking of installing Windows later. And this partition would act as the common for both.