Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!cbosgd!kww From: kww@cbosgd.UUCP Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.xenix Subject: Re: Confused file name in directory Message-ID: <3397@cbosgd.ATT.COM> Date: Sun, 1-Mar-87 18:05:23 EST Article-I.D.: cbosgd.3397 Posted: Sun Mar 1 18:05:23 1987 Date-Received: Mon, 2-Mar-87 20:52:47 EST References: <105@aob.UUCP> <563@aw.sei.cmu.edu.sei.cmu.edu> Reply-To: kww@cbosgd.UUCP (Kevin W. Wall) Organization: AT&T Bell Laboratories, Columbus Lines: 32 Xref: utgpu comp.unix.questions:1237 comp.unix.wizards:1185 comp.unix.xenix:136 In article <563@aw.sei.cmu.edu.sei.cmu.edu> pdb@sei.cmu.edu (Patrick Barron) writes: > >As a last resort you could use 'clri' on the inode associated with that >file (use 'ls -li' to find the inode numner). fsck will certainly allow >you to clear the directory entry once it realizes the inode's been zeroed. > >--Pat. This was in response to renaming a directory that had an embbeded null character in it, something like "D\0c" I believe. What about using 'fsdb' (file system debugger) and run it on the raw file system. All you need to do is find the directory block of the parent directory, and then find the "D\oc" entry and change it to "Doc". With fsdb(1M) it is not too hard since it sorta understands UNIX file systems. If you don't have fsdb (e.g., like BSD systems maybe), adb(1) will also do the trick when run on the raw device corresponding to the file system, although with 'adb', you will have to compute disk offsets, etc. yourself. Oh yeah, to be on the safe side, run /etc/umount on the file system BEFORE you start to ``play''. (Especially if you have to use adb.) Of course if its on root device, you can't do this, but then you ought to do it in single user mode, after having sync(1M)'ed it a few times to make sure everything has been flushed to the disk. Its really not as hard as you think it might be, especially if you have fsdb available. Of course, all this discussion presumes that you have SU priviledges, or writtable special files (E-gad!, talk about security holes!) Good luck!