Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!manuel!cmf851 From: cmf851@anu.oz.au (Albert Langer) Newsgroups: comp.unix.sysv386 Subject: Re: fsck Recovery From Crashes Keywords: inode file directory lost+found Message-ID: <1991Jun4.020353.11910@newshost.anu.edu.au> Date: 4 Jun 91 02:03:53 GMT References: <35@metran.UUCP> <1991Jun02.184143.15566@virtech.uucp> <1074@camco.Celestial.COM> Sender: news@newshost.anu.edu.au Organization: Computer Services Centre, Australian National University, Canberra, Australia. Lines: 45 In article <1074@camco.Celestial.COM> bill@camco.Celestial.COM (Bill Campbell) writes: >This brings to mind a utility I've been meaning to write. It >would run daily and make an index by inode number of each >filesystem to make it easier to figure out what was what in a >lost+found directory after a crash. > >Before I reinvent another wheel, has anyone already done this? ISC 2.0.2 has ff(1) to list a file system in inode order. Don't know whether it is just ISC or not. BTW It had a bug which interpreted filenames with % in the name as though it was a printf formatting character. I don't know if this has been reported or fixed. (P.S. Anybody from ISC, please consider this a report :-) I have an awk script adapted from one by Tony Moraes, which converts an ls -alR listing into the same style as "find". It would be easy to use ls -ailR and include the inode number in the output and sort on that. The SunOs 4.1 find(1) has an -ls option which includes the inode number and you could sort on that. I have a vague idea there is a gnu or other public domain find floating around. If so, it may include this option. There is an option to the SunOs 4.1 find(1) that keeps some sort of database for faster searching instead of actually descending the directories each time. You might want to provide the functionality of that at the same time. Also there are various utilities e.g. from unix world and available on uunet, for keeping track of suid and sgid files and other permissions security issues and you might want to integrate some of the functionality of those. Other uses for such a database include backup and archive administration. It would be good to make it as general purpose as possible. -- Opinions disclaimed (Authoritative answer from opinion server) Header reply address wrong. Use cmf851@csc2.anu.edu.au