Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deleting garbage file names



Actually, the file names are all sorts of characters that change the 
terminal characteristics. Actually, I don't think they are files. I just 
think the the directory itself somehow became corrupted.
I can write a program that uses stat that can call unlink(2). What I need 
to do is a force delete of the directory itself without trying to delete 
the contents.

BTW: the next time I rebuild my laptop, I'll use ext3 
"Derek D. Martin" wrote:

> At some point hitherto, Jerry Feldman hath spake thusly:
> > Somehow, one of my directories got corrupted, specifically 
> > /lib/modules.2.2.4-16/kernel/drivers/usb/serial. This was effectively 
> > preventing me from starting pcmcia. Once I figured out why pcmcia was 
> > failing, I created a new serial directory, moved in the file names that I 
> > could read. However, I could not get the rm command to remove the directory
>  
> > with -rf --directory --force, or whatever.
> 
> In my experience, the swiss army knife of troublesome file removal is:
> 
>   find . -inum <inode number> -exec rm {} \;
> 
> This works regardless of what the specific problem with the filename
> is (i.e. unprintable characters, leading dashes, etc.).  There are
> numerous other ways to do it, such as by writing a program to process
> the dirents and remove those with bogosity in them...
> 
> Also if enough of the first characters to specify the file uniquely
> are printable characters, you can use command line completion to let
> the shell figure out the right combination of bogosity for you by
> simply pressing the tab key.  It'll even do the proper quoting for
> you...
> 
> > The other question is when I do a reiserfsck with --check, fsck does report
>  
> > some corruption and recommends using the --rebuld-tree option, but this is 
> > on the root file system, and it refuses to run with this option on a 
> > mounted files system.  I could boot from CD Rom except the CD-ROM on my 
> > laptop likes to disappear each summer (Which I recently tracked down to a 
> > loose cable).
> 
> Er, boot from floppy?  Don't use reiser on your / partition?  Sounds
> like a sticky problem best avoided entirely...  But I s'pose that
> won't help you now...
> 
> - -- 
> Derek Martin               ddm at pizzashack.org    
> - ---------------------------------------------
> I prefer mail encrypted with PGP/GPG!
> GnuPG Key ID: 0x81CFE75D
> Retrieve my public key at http://pgp.mit.edu
> Learn more about it at http://www.gnupg.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
> 
> iD8DBQE89ZcldjdlQoHP510RAh5WAKC34qtGtxretcd2uFlby80q58vgcwCfT2Lm
> 8UPgUAB+NpU8qpmUzJkZUi8=
> =t9TJ
> -----END PGP SIGNATURE-----
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://www.blu.org/mailman/listinfo/discuss
> 

-- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org