Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watcgl!onfcanim!dave From: dave@onfcanim.UUCP Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.xenix Subject: Re: Confused file name in directory Message-ID: <15238@onfcanim.UUCP> Date: Sat, 28-Feb-87 15:35:42 EST Article-I.D.: onfcanim.15238 Posted: Sat Feb 28 15:35:42 1987 Date-Received: Sun, 1-Mar-87 13:29:25 EST References: <105@aob.UUCP> <563@aw.sei.cmu.edu.sei.cmu.edu> <5587@mimsy.UUCP> <1667@oddjob.UChicago.EDU> Reply-To: dave@onfcanim.UUCP (Dave Martindale) Organization: National Film Board / Office national du film, Montreal Lines: 22 Xref: utgpu comp.unix.questions:1221 comp.unix.wizards:1166 comp.unix.xenix:131 >) There is still another way, easier yet but more dangerous and >) thrilling. You cannot edit a directory, but you can edit a file. >) And the only difference between the two is one byte. ... > >Hoowie! Is that complicated. Sounds fun though. I just >unmount the partition, get out a calculator, and adb the raw >disk. It's most easily done as a three-step process: 1) unmount the disk, figure out where that inode lives on the disk, adb disk and patch the inode's "format" word to make it into a plain file. 2) mount the disk (while single user!), and edit the directory with adb, emacs, whatever 3) unmount the disk, patch the inode back into a directory, fsck the filesystem unless you have a great deal of confidence in yourself, then bring the machine back up. This minimizes the possibility of clobbering something other than the directory you want to alter.