Unable to delete corrputed files on external hard drive: “File or directory not found”
I copied (cut & paste) some files from my netbook onto my external hard drive. While copying, the complete OS froze and did not react for a considerable amount of time, so I decided to restart. After restart, I have found that not all files were copied properly.
Now, there are corrputed files on the hard disk that cannot be removed with neither rm nor any file manager. The error message is: "File or directory not found". Just re-copying the remaining files will also result in the same error.
- Operating system: Lubuntu 18.04 LTS
- External hard disk file system: NTFS
How is it possible to remove those files?
EDIT: I only have Linux tools available (i.e., no chkdsk). I have tried ntfsfix -bd /dev/sdc1 as superuser, but that did not resolve my issue. Now, I'm running testdisk, which takes a considerable amount of time, so I will not know the results before tomorrow.
filesystems data-recovery ntfs
add a comment |
I copied (cut & paste) some files from my netbook onto my external hard drive. While copying, the complete OS froze and did not react for a considerable amount of time, so I decided to restart. After restart, I have found that not all files were copied properly.
Now, there are corrputed files on the hard disk that cannot be removed with neither rm nor any file manager. The error message is: "File or directory not found". Just re-copying the remaining files will also result in the same error.
- Operating system: Lubuntu 18.04 LTS
- External hard disk file system: NTFS
How is it possible to remove those files?
EDIT: I only have Linux tools available (i.e., no chkdsk). I have tried ntfsfix -bd /dev/sdc1 as superuser, but that did not resolve my issue. Now, I'm running testdisk, which takes a considerable amount of time, so I will not know the results before tomorrow.
filesystems data-recovery ntfs
Run a "chkdsk /f" or /r on that drive.
– Moab
Jan 4 at 0:03
If you only have Linux you may want to start again -ASSUMING EVERYTHING ON THE EXTERNAL DRIVE IS BACKED UP - repartition it to FAT and reformat. You don't want to deal with NTFS under Linux
– davidgo
Jan 4 at 0:30
add a comment |
I copied (cut & paste) some files from my netbook onto my external hard drive. While copying, the complete OS froze and did not react for a considerable amount of time, so I decided to restart. After restart, I have found that not all files were copied properly.
Now, there are corrputed files on the hard disk that cannot be removed with neither rm nor any file manager. The error message is: "File or directory not found". Just re-copying the remaining files will also result in the same error.
- Operating system: Lubuntu 18.04 LTS
- External hard disk file system: NTFS
How is it possible to remove those files?
EDIT: I only have Linux tools available (i.e., no chkdsk). I have tried ntfsfix -bd /dev/sdc1 as superuser, but that did not resolve my issue. Now, I'm running testdisk, which takes a considerable amount of time, so I will not know the results before tomorrow.
filesystems data-recovery ntfs
I copied (cut & paste) some files from my netbook onto my external hard drive. While copying, the complete OS froze and did not react for a considerable amount of time, so I decided to restart. After restart, I have found that not all files were copied properly.
Now, there are corrputed files on the hard disk that cannot be removed with neither rm nor any file manager. The error message is: "File or directory not found". Just re-copying the remaining files will also result in the same error.
- Operating system: Lubuntu 18.04 LTS
- External hard disk file system: NTFS
How is it possible to remove those files?
EDIT: I only have Linux tools available (i.e., no chkdsk). I have tried ntfsfix -bd /dev/sdc1 as superuser, but that did not resolve my issue. Now, I'm running testdisk, which takes a considerable amount of time, so I will not know the results before tomorrow.
filesystems data-recovery ntfs
filesystems data-recovery ntfs
edited Jan 3 at 23:37
Green
asked Jan 3 at 23:02
GreenGreen
32
32
Run a "chkdsk /f" or /r on that drive.
– Moab
Jan 4 at 0:03
If you only have Linux you may want to start again -ASSUMING EVERYTHING ON THE EXTERNAL DRIVE IS BACKED UP - repartition it to FAT and reformat. You don't want to deal with NTFS under Linux
– davidgo
Jan 4 at 0:30
add a comment |
Run a "chkdsk /f" or /r on that drive.
– Moab
Jan 4 at 0:03
If you only have Linux you may want to start again -ASSUMING EVERYTHING ON THE EXTERNAL DRIVE IS BACKED UP - repartition it to FAT and reformat. You don't want to deal with NTFS under Linux
– davidgo
Jan 4 at 0:30
Run a "chkdsk /f" or /r on that drive.
– Moab
Jan 4 at 0:03
Run a "chkdsk /f" or /r on that drive.
– Moab
Jan 4 at 0:03
If you only have Linux you may want to start again -ASSUMING EVERYTHING ON THE EXTERNAL DRIVE IS BACKED UP - repartition it to FAT and reformat. You don't want to deal with NTFS under Linux
– davidgo
Jan 4 at 0:30
If you only have Linux you may want to start again -ASSUMING EVERYTHING ON THE EXTERNAL DRIVE IS BACKED UP - repartition it to FAT and reformat. You don't want to deal with NTFS under Linux
– davidgo
Jan 4 at 0:30
add a comment |
1 Answer
1
active
oldest
votes
The fact your OS froze during the write may indicate some hardware is faulty. Telling if the disk is healthy should be your first concern.
The disk is external, it's possible the case is the culprit. It's reasonable to connect the disk directly. You didn't tell us the details but it's probably a SATA disk and you connect the case via USB. If you'd like to connect the disk directly via SATA, be aware of this possible issue: Why is my USB drive showing corrupted data when plugged as an internal SATA drive?
To diagnose the disk:
- Check S.M.A.R.T. status (
smartctl -a /dev/sdX) and interpret it. - Run S.M.A.R.T. tests (
smartctl -t short /dev/sdX,… -t long …); check status again to see the results. - Optionally use
badblocks. - Or use (Windows)
chkdsk /r. I guess you will needchkdskanyway, so you may as well start with it.
Depending on how the disk behaves and what the results are, at some point you may want to backup your files from it. When in doubt, do it as early as you can.
- The disk is still mountable so you can probably save almost all files with plain
cp,rsyncor another tool that works on file level. - Or you can read the whole disk (or at least the partition with the filesystem) with
ddrescue.
If the disk is healthy then you may repair the filesystem on the disk. Unfortunately as far as I know there is no tool to fix corrupted NTFS under Linux. You will most likely need chkdsk from Windows.
If the disk is not healthy then you may still try to fix the filesystem there (with chkdsk). Depending on how severe the situation is you may or may not succeed and you may or may not want to use the disk any longer.
If for whatever reason you can't or don't want to use the disk any longer and the best that's left is the image from ddrescue then you should fix the filesystem within the image; again, with chkdsk. In Windows it may be possible to work with an image file; or write the image to another physical device (if not already written to a device by ddrescue in the first place) so chkdsk works without additional tricks.
I think there's little chance you can fix your NTFS filesystem in Linux (i.e. without chkdsk). A workaround is to copy all the files elsewhere and to rebuild the filesystem from scratch on the same device (if the device is healthy).
Thanks for your suggestions. I am testing the HDD now, see what happens. Actually, I suspect that the OS did not froze because of the hard disk, but just because the OS is broken since an distribution upgrade I made months ago. Since then, it randomly forgets the WiFi card or just freezes and this was my attempt to backup some remaining data to install a new OS. -- Apparently, there is little hope to do this without Windows. Consequently, I will later make a Windows installation medium and boot from it in order to accesschkdsk.
– Green
Jan 4 at 9:17
Thanks.chkdsk /fdid it just fine. According tosmartctl, the device has no errors. The reason for the crash was probably the faulty OS.
– Green
Jan 5 at 20:37
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390325%2funable-to-delete-corrputed-files-on-external-hard-drive-file-or-directory-not%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The fact your OS froze during the write may indicate some hardware is faulty. Telling if the disk is healthy should be your first concern.
The disk is external, it's possible the case is the culprit. It's reasonable to connect the disk directly. You didn't tell us the details but it's probably a SATA disk and you connect the case via USB. If you'd like to connect the disk directly via SATA, be aware of this possible issue: Why is my USB drive showing corrupted data when plugged as an internal SATA drive?
To diagnose the disk:
- Check S.M.A.R.T. status (
smartctl -a /dev/sdX) and interpret it. - Run S.M.A.R.T. tests (
smartctl -t short /dev/sdX,… -t long …); check status again to see the results. - Optionally use
badblocks. - Or use (Windows)
chkdsk /r. I guess you will needchkdskanyway, so you may as well start with it.
Depending on how the disk behaves and what the results are, at some point you may want to backup your files from it. When in doubt, do it as early as you can.
- The disk is still mountable so you can probably save almost all files with plain
cp,rsyncor another tool that works on file level. - Or you can read the whole disk (or at least the partition with the filesystem) with
ddrescue.
If the disk is healthy then you may repair the filesystem on the disk. Unfortunately as far as I know there is no tool to fix corrupted NTFS under Linux. You will most likely need chkdsk from Windows.
If the disk is not healthy then you may still try to fix the filesystem there (with chkdsk). Depending on how severe the situation is you may or may not succeed and you may or may not want to use the disk any longer.
If for whatever reason you can't or don't want to use the disk any longer and the best that's left is the image from ddrescue then you should fix the filesystem within the image; again, with chkdsk. In Windows it may be possible to work with an image file; or write the image to another physical device (if not already written to a device by ddrescue in the first place) so chkdsk works without additional tricks.
I think there's little chance you can fix your NTFS filesystem in Linux (i.e. without chkdsk). A workaround is to copy all the files elsewhere and to rebuild the filesystem from scratch on the same device (if the device is healthy).
Thanks for your suggestions. I am testing the HDD now, see what happens. Actually, I suspect that the OS did not froze because of the hard disk, but just because the OS is broken since an distribution upgrade I made months ago. Since then, it randomly forgets the WiFi card or just freezes and this was my attempt to backup some remaining data to install a new OS. -- Apparently, there is little hope to do this without Windows. Consequently, I will later make a Windows installation medium and boot from it in order to accesschkdsk.
– Green
Jan 4 at 9:17
Thanks.chkdsk /fdid it just fine. According tosmartctl, the device has no errors. The reason for the crash was probably the faulty OS.
– Green
Jan 5 at 20:37
add a comment |
The fact your OS froze during the write may indicate some hardware is faulty. Telling if the disk is healthy should be your first concern.
The disk is external, it's possible the case is the culprit. It's reasonable to connect the disk directly. You didn't tell us the details but it's probably a SATA disk and you connect the case via USB. If you'd like to connect the disk directly via SATA, be aware of this possible issue: Why is my USB drive showing corrupted data when plugged as an internal SATA drive?
To diagnose the disk:
- Check S.M.A.R.T. status (
smartctl -a /dev/sdX) and interpret it. - Run S.M.A.R.T. tests (
smartctl -t short /dev/sdX,… -t long …); check status again to see the results. - Optionally use
badblocks. - Or use (Windows)
chkdsk /r. I guess you will needchkdskanyway, so you may as well start with it.
Depending on how the disk behaves and what the results are, at some point you may want to backup your files from it. When in doubt, do it as early as you can.
- The disk is still mountable so you can probably save almost all files with plain
cp,rsyncor another tool that works on file level. - Or you can read the whole disk (or at least the partition with the filesystem) with
ddrescue.
If the disk is healthy then you may repair the filesystem on the disk. Unfortunately as far as I know there is no tool to fix corrupted NTFS under Linux. You will most likely need chkdsk from Windows.
If the disk is not healthy then you may still try to fix the filesystem there (with chkdsk). Depending on how severe the situation is you may or may not succeed and you may or may not want to use the disk any longer.
If for whatever reason you can't or don't want to use the disk any longer and the best that's left is the image from ddrescue then you should fix the filesystem within the image; again, with chkdsk. In Windows it may be possible to work with an image file; or write the image to another physical device (if not already written to a device by ddrescue in the first place) so chkdsk works without additional tricks.
I think there's little chance you can fix your NTFS filesystem in Linux (i.e. without chkdsk). A workaround is to copy all the files elsewhere and to rebuild the filesystem from scratch on the same device (if the device is healthy).
Thanks for your suggestions. I am testing the HDD now, see what happens. Actually, I suspect that the OS did not froze because of the hard disk, but just because the OS is broken since an distribution upgrade I made months ago. Since then, it randomly forgets the WiFi card or just freezes and this was my attempt to backup some remaining data to install a new OS. -- Apparently, there is little hope to do this without Windows. Consequently, I will later make a Windows installation medium and boot from it in order to accesschkdsk.
– Green
Jan 4 at 9:17
Thanks.chkdsk /fdid it just fine. According tosmartctl, the device has no errors. The reason for the crash was probably the faulty OS.
– Green
Jan 5 at 20:37
add a comment |
The fact your OS froze during the write may indicate some hardware is faulty. Telling if the disk is healthy should be your first concern.
The disk is external, it's possible the case is the culprit. It's reasonable to connect the disk directly. You didn't tell us the details but it's probably a SATA disk and you connect the case via USB. If you'd like to connect the disk directly via SATA, be aware of this possible issue: Why is my USB drive showing corrupted data when plugged as an internal SATA drive?
To diagnose the disk:
- Check S.M.A.R.T. status (
smartctl -a /dev/sdX) and interpret it. - Run S.M.A.R.T. tests (
smartctl -t short /dev/sdX,… -t long …); check status again to see the results. - Optionally use
badblocks. - Or use (Windows)
chkdsk /r. I guess you will needchkdskanyway, so you may as well start with it.
Depending on how the disk behaves and what the results are, at some point you may want to backup your files from it. When in doubt, do it as early as you can.
- The disk is still mountable so you can probably save almost all files with plain
cp,rsyncor another tool that works on file level. - Or you can read the whole disk (or at least the partition with the filesystem) with
ddrescue.
If the disk is healthy then you may repair the filesystem on the disk. Unfortunately as far as I know there is no tool to fix corrupted NTFS under Linux. You will most likely need chkdsk from Windows.
If the disk is not healthy then you may still try to fix the filesystem there (with chkdsk). Depending on how severe the situation is you may or may not succeed and you may or may not want to use the disk any longer.
If for whatever reason you can't or don't want to use the disk any longer and the best that's left is the image from ddrescue then you should fix the filesystem within the image; again, with chkdsk. In Windows it may be possible to work with an image file; or write the image to another physical device (if not already written to a device by ddrescue in the first place) so chkdsk works without additional tricks.
I think there's little chance you can fix your NTFS filesystem in Linux (i.e. without chkdsk). A workaround is to copy all the files elsewhere and to rebuild the filesystem from scratch on the same device (if the device is healthy).
The fact your OS froze during the write may indicate some hardware is faulty. Telling if the disk is healthy should be your first concern.
The disk is external, it's possible the case is the culprit. It's reasonable to connect the disk directly. You didn't tell us the details but it's probably a SATA disk and you connect the case via USB. If you'd like to connect the disk directly via SATA, be aware of this possible issue: Why is my USB drive showing corrupted data when plugged as an internal SATA drive?
To diagnose the disk:
- Check S.M.A.R.T. status (
smartctl -a /dev/sdX) and interpret it. - Run S.M.A.R.T. tests (
smartctl -t short /dev/sdX,… -t long …); check status again to see the results. - Optionally use
badblocks. - Or use (Windows)
chkdsk /r. I guess you will needchkdskanyway, so you may as well start with it.
Depending on how the disk behaves and what the results are, at some point you may want to backup your files from it. When in doubt, do it as early as you can.
- The disk is still mountable so you can probably save almost all files with plain
cp,rsyncor another tool that works on file level. - Or you can read the whole disk (or at least the partition with the filesystem) with
ddrescue.
If the disk is healthy then you may repair the filesystem on the disk. Unfortunately as far as I know there is no tool to fix corrupted NTFS under Linux. You will most likely need chkdsk from Windows.
If the disk is not healthy then you may still try to fix the filesystem there (with chkdsk). Depending on how severe the situation is you may or may not succeed and you may or may not want to use the disk any longer.
If for whatever reason you can't or don't want to use the disk any longer and the best that's left is the image from ddrescue then you should fix the filesystem within the image; again, with chkdsk. In Windows it may be possible to work with an image file; or write the image to another physical device (if not already written to a device by ddrescue in the first place) so chkdsk works without additional tricks.
I think there's little chance you can fix your NTFS filesystem in Linux (i.e. without chkdsk). A workaround is to copy all the files elsewhere and to rebuild the filesystem from scratch on the same device (if the device is healthy).
answered Jan 4 at 0:32
Kamil MaciorowskiKamil Maciorowski
27k155981
27k155981
Thanks for your suggestions. I am testing the HDD now, see what happens. Actually, I suspect that the OS did not froze because of the hard disk, but just because the OS is broken since an distribution upgrade I made months ago. Since then, it randomly forgets the WiFi card or just freezes and this was my attempt to backup some remaining data to install a new OS. -- Apparently, there is little hope to do this without Windows. Consequently, I will later make a Windows installation medium and boot from it in order to accesschkdsk.
– Green
Jan 4 at 9:17
Thanks.chkdsk /fdid it just fine. According tosmartctl, the device has no errors. The reason for the crash was probably the faulty OS.
– Green
Jan 5 at 20:37
add a comment |
Thanks for your suggestions. I am testing the HDD now, see what happens. Actually, I suspect that the OS did not froze because of the hard disk, but just because the OS is broken since an distribution upgrade I made months ago. Since then, it randomly forgets the WiFi card or just freezes and this was my attempt to backup some remaining data to install a new OS. -- Apparently, there is little hope to do this without Windows. Consequently, I will later make a Windows installation medium and boot from it in order to accesschkdsk.
– Green
Jan 4 at 9:17
Thanks.chkdsk /fdid it just fine. According tosmartctl, the device has no errors. The reason for the crash was probably the faulty OS.
– Green
Jan 5 at 20:37
Thanks for your suggestions. I am testing the HDD now, see what happens. Actually, I suspect that the OS did not froze because of the hard disk, but just because the OS is broken since an distribution upgrade I made months ago. Since then, it randomly forgets the WiFi card or just freezes and this was my attempt to backup some remaining data to install a new OS. -- Apparently, there is little hope to do this without Windows. Consequently, I will later make a Windows installation medium and boot from it in order to access
chkdsk.– Green
Jan 4 at 9:17
Thanks for your suggestions. I am testing the HDD now, see what happens. Actually, I suspect that the OS did not froze because of the hard disk, but just because the OS is broken since an distribution upgrade I made months ago. Since then, it randomly forgets the WiFi card or just freezes and this was my attempt to backup some remaining data to install a new OS. -- Apparently, there is little hope to do this without Windows. Consequently, I will later make a Windows installation medium and boot from it in order to access
chkdsk.– Green
Jan 4 at 9:17
Thanks.
chkdsk /f did it just fine. According to smartctl, the device has no errors. The reason for the crash was probably the faulty OS.– Green
Jan 5 at 20:37
Thanks.
chkdsk /f did it just fine. According to smartctl, the device has no errors. The reason for the crash was probably the faulty OS.– Green
Jan 5 at 20:37
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1390325%2funable-to-delete-corrputed-files-on-external-hard-drive-file-or-directory-not%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Run a "chkdsk /f" or /r on that drive.
– Moab
Jan 4 at 0:03
If you only have Linux you may want to start again -ASSUMING EVERYTHING ON THE EXTERNAL DRIVE IS BACKED UP - repartition it to FAT and reformat. You don't want to deal with NTFS under Linux
– davidgo
Jan 4 at 0:30