Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.UUCP (Conor P. Cahill) Newsgroups: comp.unix.wizards Subject: Re: Two identical filenames in one directory! Summary: use fsdb Message-ID: <1209@virtech.UUCP> Date: 28 Sep 89 23:44:58 GMT References: <22@minya.UUCP> Organization: Virtual Technologies Inc Lines: 31 In article <22@minya.UUCP>, jc@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)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 | +-----------------------------------------------------------------------+