Two identical filenames in one directory!

Scott Amspoker scott at bbxsda.UUCP
Sat Sep 30 03:34:54 AEST 1989


In article <11177 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>In article <22 at minya.UUCP> jc at 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



More information about the Comp.unix.wizards mailing list