fsdiff walks the filesystem starting at path and compares the filesystem to the transcripts. Trailing '/'s on path are clipped.
If a transcript is positive, fsdiff checks 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 negative, fsdiff checks only some of the attributes of the file system objects ( see TRANSCRIPTS section below ). There is only one special transcript, special.T, and 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.
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", carriage 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.
d path mode uid gid [ finder-information ] D path mode uid gid s path mode uid gid p path mode uid gid
Type 'd' is a directory, 'D' is a door, 's' is a socket and 'p' is a named pipe. Mode is a 4 digit octal representation of the permissions. ( see chmod(1). ) uid and gid are the user and group ids in decimal format. finder-information is used only on Mac OS X machines running on an HFS+ formatted drive to store directory finder information. If a directory is listed in a negative transcript, mode, uid, gid and, if listed, finder-information will be checked, but the directory itself will not be read.
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 negative transcript, 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 negative transcript, only mode, uid and gid will be checked.
Type 'a' is an applefile, relevant 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)). Everything that applies to a regular file applies to an applefile, as well.
Transcripts are sorted alphabetically, depth first, and case sensitively. 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
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, transcript name, or in the case of type special, a full pathname.
# example command file k linux-base.K p test/denser-10.T p simta-032.T n simta-neg.T s /etc/fstab
Lines beginning with "#" are comments, and are skipped. A comment must be on a line by itself. Blank lines are also skipped.
If there is no command file, the transcript used is the null transcript. This means fsdiff will print out a difference line for every object in the filesystem, eg. a filesystem snapshot.
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