The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Corrupted File Removal
Author: Kevin G 
Date:   15-08-00 09:13

Hi,

I untarred a batch of files (data type: images & html pages) and the untar kind'a blew up and left a mess of files and subdirectories with names like ^D^R^K (and others that are much much longer)

These files and subdirectories are unrecognized when I try to rm, rm -r, or rm -r -f them. fsck skips right by them.

I've had similar misadventures with Windows and then I was able to clean them out in DOS mode. In this case I am assuming the ^ is a DOS carriage return symbol or some such garbage and these are portions of image files.

The tips for stripping ^M haven't worked because these are in the file names and aren't recognized, when I try I get a "file or directory not found".

So far I have received two recommendations from someone else who has experienced the same thing: live with them or reinstall. I'd rather not do either.

Ideas or suggestions anyone? Thanks in advance,
Kevin G

Reply To This Message
 
 RE: Corrupted File Removal
Author: Philip 
Date:   15-08-00 18:10

what happens if you "rm -rf parentdir" where parentdir is the directory containing the files? Does that work?


Reply To This Message
 
 RE: Corrupted File Removal
Author: Kevin G 
Date:   15-08-00 21:54

Removing the parent directory might be a good way to get rid of these things but I haven't tried it because they are sitting in /usr, which of course is not something i want to delete.

Thanks,
Kevin G

Reply To This Message
 
 RE: Corrupted File Removal
Author: Philip 
Date:   16-08-00 17:53

Heh... yeah, that's a bummer...

Couple of other suggestions...

If you have pine installed, try using "pilot" (the file manager interface to pine). There have been times that has worked for me in the past.

If that doesn't work, try writing a perl script to look at the /usr directory and then if the file matches (some part of it -- make sure it's the right files though!) then delete them from within perl...

Maybe that will get around those funky characters...

-philip

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org