This question already has an answer here:

I have a dual boot system, and use a NTFS partition as universal storage between Windows 7 and Ubuntu.

Lately, that partition has been throwing CHKDSK prompts on Windows boot, so I thought it was a symptom of a failing drive. As a result, I cloned the drive to a larger 1TB drive and resized the partitions in Linux.

Still, the CHKDSK prompt is showing up, but this time there were a few filenames printed out in the scan, which later froze at 50% completion. These files are a set of Perl scripts that I used to create an automated panorama generation script a few years back.

Now, when I try to rm -r * in the folder where the files are held, I get

jason@asus:/media/Storage/Programming/Libraries/Linux$ rm -r *
rm: cannot remove `Image-Size-3.232/blib/man3/Image::Size.3pm': No such file or directory
rm: cannot remove `Panotools-Script-0.26/blib/man3/Panotools::Makefile.3pm': No such file or directory
rm: cannot remove `Panotools-Script-0.26/blib/man3/Panotools::Makefile::Comment.3pm': No such file or directory
rm: cannot remove `Panotools-Script-0.26/blib/man3/Panotools::Makefile::Rule.3pm': No such file or directory
rm: cannot remove `Panotools-Script-0.26/blib/man3/Panotools::Makefile::Utils.3pm': No such file or directory

Now, inside Image-Size-3.232/blib/man3/, I executed ls -il which printed out

3723 -rwxrwxrwx 0 root root 25473 Jun 19  2012 Image::Size.3pm

Now, stat 3723 prints out

jason@asus:/media/Storage/Programming/Libraries/Linux/Image-Size-3.232/blib/man3$ stat 3723
stat: cannot stat `3723': No such file or directory

How can I remove these files that have so far proven fireproof to any convential removal function?

marked as duplicate by slm Nov 30 '14 at 23:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Can you mv them or cp them or cat them or anything else? – terdon Oct 29 '13 at 23:57

Unfortunately, you can't safely and reliably delete them from Linux, especially if you are regularly going back and forth between Linux and Windows.

This is because filenames with colons are not valid per the Microsoft variant of the NTFS specification, but are valid using Tuxera's default mount options for ntfs-3g. More information in this question.

Be very careful running Microsoft's chkdsk, as it will consider all filenames with colons to be invalid, and immediately delete them (rather than altering the filename and preserving the data).

Unfortunately, this is the only way that I know of to delete the files and return the filesystem to a clean state.


Instead of wasting your time trying to delete files, I would try and run the disk through an application such as either HDAT (freeware) or possibly Spinrite (Commercial).

Additionally you can check the drive's SMART info:

$ smartctl --all /dev/{hd?,sd?}

This won't fix anything but will let you know if there is something up with the health of the drive.

  • The OP's question is about a very specific compatibility issue at the filesystem level. While general hard-drive diagnostics are often warranted, this specific symptom will appear even if there is nothing wrong with the drives. – Royce Williams Oct 6 '17 at 19:35

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