Two identical filenames in one directory!

Conor P. Cahill cpcahil at virtech.UUCP
Sat Sep 30 22:00:34 AEST 1989


In article <188 at bbxsda.UUCP>, scott at bbxsda.UUCP (Scott Amspoker) writes:
> 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.)

No.  The problem was that the original poster had gotten a file with a
name that looked like the following:
	
	access\0\0\0\0\0\0\0\102

since the name contains non-null bytes after a null, there is no way 
to access the file through the system call interface.

> 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?

See above.

> 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.

This would probably work.
-- 
+-----------------------------------------------------------------------+
| Conor P. Cahill     uunet!virtech!cpcahil      	703-430-9247	!
| Virtual Technologies Inc.,    P. O. Box 876,   Sterling, VA 22170     |
+-----------------------------------------------------------------------+



More information about the Comp.unix.wizards mailing list