Results 1 to 5 of 5

Thread: How to remove damage files from USB drive

  1. #1
    Join Date
    Jun 2008
    Location
    Pacific Northwest
    Posts
    371

    Default How to remove damage files from USB drive

    The .trash-1000 folder of by WD USB drive contains a number of damage files and folders. KDE trash fails to remove these. I went into the terminal, under superuser. The rm -r command fails, indicating that directories are not empty. Looking into these folders, somehow the pdf and odt files register as folders. rmdir doesn't get rid of these files either. I think these files got damaged when a copy to the usb drive was canceled midway through writing. Obviously I can reformat the drive. I'd rather not do that as it contains a lot of back up data. Any help would be appreciated.
    The greatest obstacle to discovery is not ignorance, it is the illusion of knowledge.
    Daniel J. Boorstin US Patent Office

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to remove damage files from USB drive

    On 2014-03-30 00:36, Parthenolide wrote:

    > canceled midway through writing. Obviously I can reformat the drive. I'd
    > rather not do that as it contains a lot of back up data. Any help would
    > be appreciated.


    fsck it.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  3. #3
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,480
    Blog Entries
    3

    Default Re: How to remove damage files from USB drive

    Quote Originally Posted by robin_listas View Post
    fsck it.
    Or, if it has a Windows file system, mount the USB drive under Windows and use CHKDSK on it.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  4. #4

    Default Re: How to remove damage files from USB drive

    There are many options for fsck. Type fsck. and press tab twice.

    Code:
    fsck.<TAB> + <TAB>
    For NTFS fs there is also ntfsfix. Type ntfs and press tab twice.

    Code:
    ntfs<TAB> + <TAB>
    Those tab completion should show you what is available in your system. Although if you have some important data on that disk and it is indeed a NTFS fs then boot your favorite windows os and fix it from there.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,973

    Default Re: How to remove damage files from USB drive

    Quote Originally Posted by Parthenolide View Post
    The rm -r command fails, indicating that directories are not empty.
    A bit off topic, but you can use the -f option to force the removal of a directory that is not empty. See the rm man page.

    But I am not sure if that is clever to do in this situation.
    Henk van Velden

Posting Permissions

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