[1mSYNOPSIS[0m
[1mfsdiff [22m{ [1m-C [22m| [1m-A [22m| [1m-1 [22m} [ [1m-IV [22m] [ [1m-K [4m[22mcommand[24m ] [ [1m-c [4m[22mchecksum[24m ] [
[1m-o [4m[22mfile[24m [ [1m-% [22m] ] [4mpath[0m
[1mDESCRIPTION[0m
[1mfsdiff [22mreads a command file (the default name is [1mcommand.K) [22mto get a
list of transcripts. If the command file is empty, the transcript list
is considered to be the null transcript. Included command files are
read depth first. The first transcript listed has the lowest prece-
dence, the next higher, and the last has the highest. If any special
files are listed, the [1mspecial.T [22mtranscript will have the absolute high-
est precedence.
[1mfsdiff [22mwalks the filesystem starting at [4mpath[24m and compares the filesys-
tem to the transcripts. Trailing '/'s on [4mpath[24m are clipped.
If a transcript is [1mpositive, fsdiff [22mchecks all attributes of each file
system object ( i.e. file, directory, link, etc ). If the -c option is
given, checksums are also compared. If a transcript is [1mnegative, fsd-[0m
[1miff [22mchecks only some of the attributes of the file system objects ( see
TRANSCRIPTS section below ). There is only one [1mspecial [22mtranscript,
[1mspecial.T, [22mand it contains references to files that are host specific,
eg. /etc/hostname.hme0.
Any discrepancies are printed on the standard output or, with the -o
option, to a file. The default is to print the differences as edits to
the transcript to make it match the filesystem. If the edit direction
chosen is -T or -A, the differences are printed as edits to the file
system to make it match the transcript. A "+" at the beginning of a
line indicates a file must be downloaded. A "-" indicates the given
object ( file, directory, link etc ) must be removed.
[1mTRANSCRIPTS[0m
A transcript contains a list of filesystem objects, eg. directories,
files, symbolic links etc. Transcripts have the following format:
type path [type specific information]
Type is a single letter: h, l, d, c, b, p, s, D, f, a. Path is the
encoded path, where space is "\b", tab is "\t", newline is "\n", car-
riage return is "\r", and \ is "\\". The type specific information
varies.
l path target
h path target
Type 'l' is a symbolic link and 'h' is a hard link. Target is encoded
like path. If a symbolic link is listed in a negative transcript, the
target is not checked.
b path mode uid gid major minor
c path mode uid gid major minor
Type 'b' is a block special file, 'c' is a character special file.
Major and minor are the major and minor device numbers in decimal. If
a character special file is listed in a [1mnegative [22mtranscript, only major
and minor device number will be checked.
f path mode uid gid mtime size checksum
a path mode uid gid mtime size checksum
Type 'f' is a reuglar file. Mtime is a decimal number of seconds since
1970 GMT. Size is the size of the file in bytes. Checksum is the
base64 encoded checksum if enabled, otherwise it is "-". If a file is
listed in a [1mnegative [22mtranscript, only mode, uid and gid will be
checked.
Type 'a' is an [1mapplefile, [22mrelevant only on Mac OS X machines running on
an HFS+ formatted drive. An applefile has Mac OS metadata, and is
stored on the server as an AppleSingle file (see applefile(5)). Every-
thing that applies to a regular file applies to an applefile, as well.
Transcripts are sorted alphabetically, depth first, and case sensi-
tively. This means subdirectories have precedence over files in the
same directory: lexically, "/" has highest precedence. So the file:
/etc/passwd
comes before:
/etc.old
even though "." normally comes before "/", and:
/Library
would come before:
/dev
as capitalized characters are higher in precedence than lowercase ones.
Both of the previous two directories would come before:
/etc.old
[1mCOMMAND FILES[0m
Command files have the following format:
type path
Type is 'k' for command file, 'p' for positive, 'n' for negative and
's' for special. The argument path is either a command file name, tran-
object in the filesystem, eg. a filesystem snapshot.
Positive and negative transcripts and special files can be removed from
a command file by using minus lines. These lines effectively remove
all previously referenced lines that match both the type and path of
the minus line. Minus lines begin with a '-', followed by some amount
of whitespace.
Minus lines only apply to transcripts and special files that have
already been read from a command file. If a subsequent line or
included command file lists the same transcript or special file, it
will be once again included.
For example, if you wanted to remove the special file /etc/fstab from
the previous example, you could use this command file:
# example command file
k linux-base.K
p test/denser-10.T
p simta-032.T
n simta-neg.T
s /etc/fstab
- s /etc/fstab
The minus line in this example would match the special file /etc/fstab,
causing it to be effectively removed from the command file.
[1mEXAMPLES[0m
In this example, fsdiff is used to generate a line for the negative
transcript for /tmp.
example% fsdiff -1 /tmp
d /tmp 1777 0 3
example%
A more complete negative transcript might look like this:
example% vi negative.T
f /etc/passwd 0444 0 3 993477914 482 -
d /proc 0555 0 0
d /tmp 1777 0 3
f /var/adm/lastlog 0444 0 1 993662219 976304 -
f /var/adm/messages 0644 0 0 993661335 94910 -
f /var/adm/sulog 0600 0 0 993662246 422 -
f /var/adm/utmpx 0644 0 2 993662219 2604 -
f /var/adm/wtmpx 0644 4 4 993662219 111600 -
f /var/cron/log 0600 0 0 993627000 2694 -
d /xfn 0555 0 0
[1mOPTIONS[0m
[1m-% [22mpercentage done progress output. Requires -o option.
[1m-I [22mbe case insensitive when compairing paths.
[1m-K [4m[22mcommand[24m specifies a command file name, by default [1m_RAD-[0m
[1mMIND_COMMANDFILE[0m
[1m-o [4m[22mfile[24m specifies an output file, default is the standard
output.
[1m-V [22mdisplays the version number of [1mfsdiff[22m, a list of
supported checksumming algorithms in descending
order of preference and then exits.
[1mFILES[0m
[1m_RADMIND_COMMANDFILE[0m
name of the default command file.
[1mspecial.T [22mname of the special transcript.
[1mEXIT STATUS[0m
The following exit values are returned:
0 No errors.
>1 An error occurred.
[1mSEE ALSO[0m
[1mktcheck[22m(1), [1mlapply[22m(1), [1mlcksum[22m(1), [1mlcreate[22m(1), [1mlfdiff[22m(1), [1mlmerge[22m(1),
[1mlsort[22m(1), [1mtwhich[22m(1), [1mapplefile[22m(5), [1mradmind[22m(8).
RSUG _RADMIND_BUILD_DATE fsdiff(1)
Man(1) output converted with
man2html