SYNOPSIS

       fsdiff  {  -C  |  -A  |  -1  } [ -IV ] [ -K command ] [ -c checksum ] [
       -o file [ -% ] ] path



DESCRIPTION

       fsdiff reads a command file (the default name is command.K)  to  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 special.T transcript will have the absolute high-
       est precedence.

       fsdiff walks the filesystem starting at path and compares the  filesys-
       tem 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, fsd-
       iff 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.



TRANSCRIPTS

       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 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)).  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


COMMAND FILES

       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.


EXAMPLES

       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



OPTIONS

       -%                 percentage done progress output. Requires -o option.
       -I                 be case insensitive when compairing paths.

       -K command         specifies  a  command  file  name,  by default _RAD-
                          MIND_COMMANDFILE

       -o file            specifies an output file, default  is  the  standard
                          output.

       -V                 displays  the  version  number of fsdiff, a list  of
                          supported  checksumming  algorithms  in   descending
                          order of preference and then exits.



FILES

       _RADMIND_COMMANDFILE
                          name of the default command file.

       special.T          name of the special transcript.



EXIT STATUS

       The following exit values are returned:

       0    No errors.

       >1   An error occurred.



SEE ALSO

       ktcheck(1),  lapply(1),  lcksum(1),  lcreate(1),  lfdiff(1), lmerge(1),
       lsort(1), twhich(1), applefile(5), radmind(8).




RSUG _RADMIND_BUILD_DATE fsdiff(1)



Man(1) output converted with man2html