fsck Recovery From Crashes

bill bill at franklin.com
Sun Jun 9 04:52:43 AEST 1991


In article <1991Jun6.070129.4796 at newshost.anu.edu.au> cmf851 at anu.oz.au (Albert Langer) writes:
: In article <4Jun91.144729.1340 at franklin.com> bill at franklin.com (bill) writes:
: >: 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.
: >
: >Urk. Why go to all the hassle?
: >
: >     find $dir -mount -print | xargs ls -di
: >
: >gets you inode,file in a neat listing.
:
: True. The awk script was developed for processing the output of
: ftp ls commands where it is only possible to run ls but not find.
: (It also processes dates into a uniform sortable format instead
: of the different handling of recent and ancient dates by ls -l).

That solves a different problem and is probably overkill, though
the date sorting is nice. I wish ls had an option to force a
uniform output. Sigh.

: While it would not be worth writing for the inode directory, I
: imagine it is probably more efficient than running ls on each
: small batch of file names with xarg.

You end up reloading /bin/ls every N files, as compared to the
inefficiency of using awk. (Which is *really* awful if you don't
have a coprocessor.) If /bin/ls is chmod +t, this cost is very
small. Also, you'd probably do a bit more I/O in the pipe with
your method.

Which is better can't be decided a priori; measurement seems in
order but has to be done on the target system.

: I also suggested the find -ls option which would be yet more
: efficient where available and ff which would be the
: most efficient.

Yes. Where available. Find -ls isn't on SysV<4 systems (maybe on
SysV4); ff is on mine, anyway, but I have no idea whether it is
more efficient, nor if it is a standard. Also, ff uses the `ftw'
package, I understand, and that will barf if your hierarchies go
sufficiently deep.

: Don't forget he's planning to run this every day on every file.

Unless he's got a humongous partition, this is probably
irrelevant. I already do several finds each day on my file
systems, though for different reasons. (One, the "skulker" to
trash old cores and a.outs, and another to collect statistics.)
These run very quickly, even with my 272M of disk.



More information about the Comp.unix.sysv386 mailing list