LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Can't delete or remove files..... (https://www.linuxquestions.org/questions/linux-desktop-74/cant-delete-or-remove-files-621582/)

budword 02-16-2008 08:12 AM

Can't delete or remove files.....
 
Here is the output of ls -l ...

?--------- ? ? ? ? ? mosquito_coast.avi
-rwxrwxrwx 1 root root 1439496680 2007-01-10 01:53 narnia.avi
?--------- ? ? ? ? ? ocean11.avi
-rwxrwxrwx 2 root root 1125529512 2007-05-17 20:53 peter_pan.avi

The entries with the ?'s I can't delete. I was copying them from an external hard drive when my daughter turned off the hard drive, so the copy never completed. Now I can't get rid of the partial files, I've tried rm -rf and shred -u and every other damn thing I can think of. I've tried as sudo and as a regular user.

I'm using kubuntu 7.10 if it matters. Thanks much...

David

MoonMind 02-16-2008 08:22 AM

Try
Code:

$ sudo chown [yourusername] *.avi; sudo chgrp [yourusername] *.avi; sudo chmod 644 *.avi
At the moment, the file don't have a owner/group or anything. Maybe you can change this with the command sequence I indicated. However, the fact that they don't have a file size isn't very reassuring...

M.

budword 02-16-2008 09:19 AM

I tried your solution. I got the following errors.

chmod: cannot access `mosquito_coast.avi': Input/output error
chmod: cannot access `ocean11.avi': Input/output error
chmod: cannot access `rounders.avi': Input/output error

Thank you for the thought though.

David

MoonMind 02-16-2008 10:24 AM

Thought so... Well, I've done a bit of research and found this:

http://kde-apps.org/content/show.php?content=28631

Since you're on Kubuntu (at least if your profile's still valid ;)), this might be a good choice. Don't know if it solves this specific problem, though - but it's worth a try anyway.

Another idea: I wonder if one could just generate empty files (using touch) with the same name (in another directory) and then just try to copy them over the damaged ones. It's not very likely to work, either, but why not try anyway? If it works, you'll be able to remove the 0 byte files.

M.

David the H. 02-16-2008 11:08 AM

If the drive got turned off mid-copy, the file system/journal may be out of whack. Try running fsck on it. That might repair the damage.

budword 02-16-2008 11:26 AM

Hi, thanks for the thoughts. I've tried kleansweep, and creating other files with the same name and moving them. Tried renaming them, moving them. Nothing worked. Also, the drive the files were being copied FROM was shut off, the problem is removing the "leftover" files (for lack of a better term) on the drive that WASN'T shut off. So I don't think it's a filesystem problem, but I'll try that too, as it shouldn't hurt anything. I also couldn't re-copy the same files over to the same dir, but if I first changed the name of the file, THEN it copies just fine, so I think both filesystems are fine, but I'll run some repair and diagnostics on both drives, just in case. Thanks much, any new ideas are appreciated.

David

P.S. While checking out file system repair utilities, it occurred to me that I've left out some crucial info. The files in question are on a ntfs partition I share with windows on a dual boot box. The rest of windows isn't on that partition, it's just for media and backups. I haven't booted to windows in months, so maybe I can fix it on the dark side....unless anyone here has any other ideas.


All times are GMT -5. The time now is 11:41 AM.