validating dumps
Rick Lindsley
richl at penguin.USS.TEK.COM
Tue Aug 22 08:18:36 AEST 1989
In article <794 at Terra.cc.brunel.ac.uk> linda at cc.brunel.ac.uk (Linda Birmingham) writes:
I'm trying to validate dump tapes.
I liked someones idea of trying to restore the last file on the tape.
The question was...how do I know which is the last file.
restore tv will print out things like
dir 2 .
dir 1536 ./etc
leaf 1630 ./etc/dumpdates
A "dir" is obvious; a "leaf" is really just "not-dir". A simple awk
script will then help you here:
restore tv | awk '$1 == "leaf" {if (ino < $2) file = $3;} END {print file}'
This fails if that last filename has white space in it.
Rick
More information about the Comp.unix.wizards
mailing list