Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!think.com!snorkelwacker.mit.edu!shelby!unix!hplabs!hpfcso!hpfcdc!donn From: donn@hpfcdc.HP.COM (Donn Terry) Newsgroups: comp.unix.internals Subject: Re: Re: Help! There's a slash '/' in my filename. Message-ID: <32040003@hpfcdc.HP.COM> Date: 20 Feb 91 04:44:46 GMT References: <43579@ut-emx.uucp> Organization: HP Fort Collins, Co. Lines: 39 Having once had the joy ( :-} ) of dealing with a version of fsck(!) that would create filenames with imbedded nulls in them (even worse than imbedded slashes because they don't print right!), the discussion about how to remove such filenames is correct: you can't do it easily. I know of several ways (without going back to the offending software if it is even capable of undoing the damage).: Use fsdb to patch the filename field of the directory entry. Be sure you don't make things worse (like imbed a null). (In theory this doesn't require a fsck, but in theory all unused guns are always unloaded, too.) Use fsdb to zero the i-number field of the diretory entry, and fsck to get the link count back to the right value. (Only experienced fsdb users should use fsdb; there's a catch-22 here that should be taken with a grain of salt: fsdb is hard to use and error-prone.) The clri trick mentioned here earlier. The trick of linking all good files and nuking the directory. However this may leave it in lost+found, instead. Write a C program that does one of the above actions to the open raw file system. (Probably worse than using fsdb because finding the right place is hard.) Have a version of fsck that looks for such junk and fixes it. Some exist, and if you have source it's probably easier to fix it in fsck than learning fsdb (which is not to say that fixing it in fsck is trivial, but not's not too hard). I guess you could back up everything (else) and reinitialize the media, but I'd rather not. Donn Terry HP, Ft. Collins Brought to you by Super Global Mega Corp .com