Results 1 to 10 of 10

Thread: Delete corrupt file-folder from NTFS External disk

  1. #1
    Join Date
    Jun 2018
    Beans
    4

    Delete corrupt file-folder from NTFS External disk

    Hello everyone. I had a file on my external HDD which was called install.txt. Now for some reason this file is corrupted and it appears as a folder. I don't need that file anymore so I want to delete it. It's not actually a folder because when I delete it as folder with rm -R it says "No such file or directory". When I delete it with rm it says that it's a folder. I can't rename, move or delete using the gui (I get "No such file or directory"). How do I get rid of that file?


    Some useful screenshots:





    Last edited by 1nikolas2; July 11th, 2018 at 11:24 AM.

  2. #2
    Join Date
    Dec 2008
    Location
    Glos, UK
    Beans
    408
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Delete corrupt file-folder from NTFS External disk

    Perhaps you can move it?

    So Create a new folder (I'll call it todel). Move install.txt into it, then try deleting todel.
    There are more irrational numbers than there are digits in the full expansion of pi.

  3. #3
    Join Date
    Jun 2018
    Beans
    4

    Re: Delete corrupt file-folder from NTFS External disk

    Quote Originally Posted by col48 View Post
    Perhaps you can move it?

    So Create a new folder (I'll call it todel). Move install.txt into it, then try deleting todel.

    I can't move, rename or delete:

    Code:
    nikolas@Nick-Ubuntu:/media/nikolas/Nick HD$ mv install.txt Test
    mv: cannot move 'install.txt' to 'Test/install.txt': No such file or directory
    Anyway thanks for your reply

  4. #4
    Join Date
    Apr 2007
    Beans
    2,778
    Distro
    Ubuntu

    Re: Delete corrupt file-folder from NTFS External disk

    Have the ntfs file system checked, preferably by connecting it to a Windows machine and running the drive checking tools. Preferably, attempt to remove the file/folder in Wiindows right after checking it there.

    If you don't have Windows, try checking the file system with ntfsfix: after that you may be able to delete the file/folder.

  5. #5
    Join Date
    Mar 2011
    Location
    U.K.
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Delete corrupt file-folder from NTFS External disk

    This is a hunch. Since the file is in ntfs folder I note that the filepath contains a space.
    /media/nikolas/Nick HD

    Can you use quotations in your filepath or alternatively change pathname to
    /media/nikolas/Nick_HD

  6. #6
    Join Date
    Jun 2018
    Beans
    4

    Re: Delete corrupt file-folder from NTFS External disk

    Quote Originally Posted by vanadium View Post
    Have the ntfs file system checked, preferably by connecting it to a Windows machine and running the drive checking tools. Preferably, attempt to remove the file/folder in Wiindows right after checking it there.

    If you don't have Windows, try checking the file system with ntfsfix: after that you may be able to delete the file/folder.
    ntfsfix didn't work. Windows did read the file as txt but as soon as I opened it it got deleted. I didn't think that windows would work that's why I didn't try. Thank you!

  7. #7
    Join Date
    Jun 2018
    Beans
    4

    Re: Delete corrupt file-folder from NTFS External disk

    Quote Originally Posted by dragonfly41 View Post
    This is a hunch. Since the file is in ntfs folder I note that the filepath contains a space.
    /media/nikolas/Nick HD

    Can you use quotations in your filepath or alternatively change pathname to
    /media/nikolas/Nick_HD
    It doesn't matter. Both Ubuntu and Debian on Rasbpberry pi can read this name

  8. #8
    Join Date
    Dec 2008
    Location
    Glos, UK
    Beans
    408
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Delete corrupt file-folder from NTFS External disk

    Perhaps knowing the permissions according to Ubuntu may illuminate? Frankly, it's beyond me.

    In a Terminal,
    ls -al /media/nikolas/Nick HD
    (you'll have to esc the space in the folder name using \)
    and post the result.
    There are more irrational numbers than there are digits in the full expansion of pi.

  9. #9
    Join Date
    Apr 2007
    Beans
    2,778
    Distro
    Ubuntu

    Re: Delete corrupt file-folder from NTFS External disk

    Quote Originally Posted by 1nikolas2 View Post
    ntfsfix didn't work. Windows did read the file as txt but as soon as I opened it it got deleted. I didn't think that windows would work that's why I didn't try. Thank you!
    The issue is that the ntfs file system format is proprietary. The only tools that can check an ntfs partition perfectly are windows tools. ntfsfix can do some repair under linux, but not with the depth Windows can.

  10. #10
    Join Date
    Jun 2014
    Beans
    4,839

    Re: Delete corrupt file-folder from NTFS External disk

    I didn't think that windows would work that's why I didn't try
    That seems a little bizarre to me. If you want to make changes of any kind on an ntfs filesystem, first use windows. You don't really need to worry about the reverse as a default windows won't read Linux.
    If there is corruption of any king on an ntfs (or other) windows filesystems, the first step is to use windows. The only time you try any Linux is if your windows will not boot.

    ntfsfix is 'usually' available on 'most' Linux systems and 'usually' will be able to make some 'minor' repairs and there is no reason to expect more.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •