Two identical filenames in one directory!

Conor P. Cahill cpcahil at virtech.UUCP
Fri Sep 29 09:44:58 AEST 1989


In article <22 at minya.UUCP>, jc at minya.UUCP (John Chambers) writes:
> Does anyone know a solution to this problem, short 
> of zeroing the directory, running fsck, and reinstalling from backup?  The 
> best way would be to say "Yes, root can write a directory; here's how..."

Use fsdb to patch the directory using the following sequence:

		ls -li .  (to get inode number of directory
		cd /
		umount /dev/dsk/...   		(file system file is on)
		fsdb /dev/rdsk/...

		(assuming 454 is the inode number of the directory)
		454i.fd				(displays directory entries)
		
		(look for the culprit.  remember what entry it is in the dir)
		(this assumes it is in slot 14)

		d14.nm="now_14_char_nm"		(rename entry 14)

		<CTRL-D>

		remount the file system and now remove the file.

Note that the new name given to the file must be 14 chars in order to 
fill all byte positions.
-- 
+-----------------------------------------------------------------------+
| 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