Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.unix.wizards Subject: Re: Two identical filenames in one directory! Message-ID: <188@bbxsda.UUCP> Date: 29 Sep 89 17:34:54 GMT References: <22@minya.UUCP> <11177@smoke.BRL.MIL> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Organization: Basis International, Albuquerque, NM Lines: 25 In article <11177@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >In article <22@minya.UUCP> jc@minya.UUCP (John Chambers) writes: >>On earlier versions of Unix, I'd know instantly what to do. It's easy enough >>to write a program that runs thru a directory and extends each null byte to >>the end of the entry. But on Sys/V, this doesn't work, because nobody, not >>even root, can write a directory. > >For just this one entry, you should be able to patch the raw disk image. I missed the original posting of the problem but I assume that you have to directory entries with the same name field. (I won't ask how you managed to do that.) Assuming that the 'ln' and 'rm' commands will operate on the first occurance of the duplicate file name it should be easy enough to rename one of the files. Am I missing something? Are these files sharing the same inode? Are they different files? Another approach is to copy the entire directory and do a 'clri' on the inode for the *old directory*. Then let 'fsck' pick up the pieces. -- Scott Amspoker Basis International, Albuquerque, NM (505) 345-5232