Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fdfit(SCO) — System V/386 Software Development System 3.2.2b

Media Vault

Software Library

Restoration Projects

Artifacts Sought


     UNIX System V (XENIX or UNIX)           FDFIT(SCO)



     Name
          fdfit - fits file archives onto media volumes


     Syntax
          fdfit [options]...  size packages...

          -f format
               The files will be  saved  in  a  format  archive.   The
               default  format  is the first listed in /etc/fdformats,
               and by convention is tar.  A number may be appended  to
               format;  the  meaning  of that number depends on format
               but  usually  indicates  the  blocking   factor.    For
               example, a format of ``tar20'' means tar blocked 20.

               The archive formats listed in /etc/fdformats include:

               tar[b]
                    tar format, blocked b.

               cpio[c][B]
                    cpio format,  either  binary  or  ASCII  (c),  and
                    either default blocking or 5120 byte records (B).

               ar   An ar(CP) archive.

               dd[obs]
                    dd(C) ``format,'' with an output  record  size  of
                    obs bytes.

          -o pattern
          Pattern is the naming convention used for the output  files.
          Every time ``#'' appears in pattern, the two digit number of
          the volume is substituted.  There must be at least one ``#''
          in  pattern;  the  default  is  #.fd.   Volumes are numbered
          starting at one (``01''); if there are any files too big  to
          fit  in  on  a single volume, these will be listed as volume
          ``00.'' Any old files following the naming pattern  will  be
          removed.

          -q
          Does not complain about absolute pathnames, even if they are
          not recommended for format.

          -e
          Exits successfully even if some of the files in the packages
          could not be found.

          -v
          Prints, on the standard  output,  a  table  summarizing  the
          arrangement chosen and the efficiency achieved.

          -F formatsfile
          Alternate  list  of  format  descriptions;  the  default  is
          /etc/fdformats.

          -O algorithm
          Specifies the default arranging algorithm:

          n    ``Next file'' - If the next file in the input list does
               not  fit  on  the current volume, the current volume is
               finished and a new volume started.  This preserves  the
               order of the files but may waste volumes.

          f    ``First fit'' -  The  first  file  which  fits  on  the
               current  volume  is  chosen for that volume.  Only when
               none of the files fit is the  current  volume  finished
               and a new volume started.

          b    ``Biggest fit'' - Similar to algorithm f,  except  that
               the largest file possible is chosen.

          s    ``Smallest fit'' - Identical  to  algorithm  b,  except
               that the smallest file possible is chosen.

          :    Each package is to start on a new volume.

          +    After one package is finished, the next package may  be
               started on that volume.

               Note that the default algorithm can be overridden on  a
               package-by-package    basis.    The   initial   default
               algorithm is ``f+.''

          -c
          Checks to see if  each  package  will  fit  on  exactly  one
          volume.   No  output  files are generated unless an explicit
          pattern is given, and all algorithms are ignored.

          -l label
          The  file  named  label  (which  is  a  pattern  similar  to
          -o pattern) will be the first file on each volume.  If label
          doesn't exist, it will be created with  zero  length  and  a
          mode  of  0444  (only  read  access for all).  If label does
          exist, it must be a regular file; whatever  size  label  has
          will be used.

          Size, which must be given after all options, is the size  of
          each  volume  in  bytes.   A  suffix of ``k'' multiplies the
          number by 1024, ``b'' by 512, and ``w'' by 2.

          Packages are collections of files which are to  be  arranged
          as  an indivisible unit.  If the ``:'' algorithm modifier is
          in effect, each  package  starts  a  new  volume;  otherwise
          (``+'')  packages  may  share volumes.  At least one package
          must be described after size:

          file
          The files in this package are listed in  file;  the  package
          has  the default algorithm applied to it.  A file of - means
          the standard input.

          -p[algorithm] file
          Same as above, except that algorithm (if given) will be used
          instead of the default.

          -P[algorithm] files...
          Similar to -p, except that the named files are the package.


     Description
          fdfit tries to arrange groups (``packages'') of  files  onto
          the  fewest number of media volumes while avoiding splitting
          any file across two or more media volumes.  Packages are not
          intermixed,  and  all  links  to a file within a package are
          placed on the same volume.  Each volume has  a  capacity  of
          size  bytes,  and  is written in a specified format, such as
          tar(C) or cpio(C).

          An arbitrary number of packages may be given.  The  packages
          are  dealt  with  on  a  one-by-one basis, with each package
          being  completely  arranged  before  the  next  package   is
          started.   The algorithm used to arrange each package may be
          individually specified.  Whether or not a package can  start
          on  the  same  volume  which  holds  the end of the previous
          package may also be specified.

          The output of fdfit is a series of  files;  the  first  file
          lists  the files that belong on volume one, the second lists
          the files for volume two, and so on (up to a  limit  of  100
          volumes).


     Notes
          Links in  packages  arranged  by  the  ``n''  algorithm  are
          usually scrambled.

          No effort is made to ensure that directories  occur  in  the
          arrangement before any files contained in them.

          Some formats are inherently non-portable.  Furthermore, some
          of   the  portable  formats,  such  as  tar,  have  slightly
          different overheads on different machines.

          Under obscure conditions, linked files in large packages may
          cause infinite looping.


     Format File
          An fdformats file  describes  a  file  archiving  format  to
          fdfit(SCO).   fdfit  only understands distributed dictionary
          archives, such as tar(C), cpio(C), and ar(CP).

          Each line in an fdformats file describes a separate  format.
          The format is in the form:

          fdformats volhdr filhdr volblk filrnd [ + ] [ / ] [ type [ size ]]...


          Empty lines, and lines beginning with ``*,'' are ignored.

          The first field, format, names the archive being  described.
          Format  is  an alphabetic name; no digits or non-letters are
          allowed.

          The next four fields are decimal numbers giving the critical
          values:

          volhdr
               The overhead for each volume (floppy).  This is the sum
               of the sizes of the volume header and trailer blocks.

          filhdr
               The overhead for each file (element)  in  the  archive.
               This  is the sum of the sizes of the element header and
               trailer blocks, and may be dependent on the  length  of
               the file's name.  If so, a ``+'' should be specified in
               the miscellaneous fields section  at  the  end  of  the
               line.

          volblk
               The  volume  blocking  factor.   The  number  of  bytes
               written  to  each  volume  is always a multiple of this
               size.

          filrnd
               The  file  rounding  boundary.   Each  element  in  the
               archive,  with its header and trailer, is rounded up to
               the next such boundary.

               Each of these values may have a suffixed unit of ``w,''
               ``b,''  or  ``k,''  indicating  multiplication  of  the
               number by 2, 512, and 1024 respectively.

               In addition, each number may be prefixed by ``#.'' This
               causes  the  number suffixed to format, as specified by
               the user with the -fformat flag to fdfit,  to  be  used
               instead  of the value given in fdformats.  If the value
               in fdformats is suffixed with a unit, the value from  -
               fformat  is  multipiled as indicated, ignoring any unit
               the  user  specified.   But  when  fdformats  does  not
               indicate  a  unit,  any unit indicated with -fformat is
               used.

               After the four values is  a  miscellaneous  information
               section.   If this contains a ``+,'' then the length of
               a file's name must be added to that file's  filhdr.   A
               ``/'' says that absolute pathnames are not a problem in
               this format .

               The other fields in the  miscellaneous  section  are  a
               single  character  type  optionally  followed by a size
               value.  Type indicates that a special file is correctly
               saved in a format archive:

          b    Block special device.

          c    Character special device.

          d    Directory.

          n    Name space entry, such as semaphores  and  shared  data
               regions.

          p    Named pipes (FIFO's).

          &    Links to previously saved files.

               If size is a number (which may have a unit suffix), the
               type  special  file  is always saved as if it were size
               bytes long.  A size of ``#'' uses the actual file  size
               obtained  from  stat(S).   Otherwise,  when  no size is
               specified, zero (0) is assumed - the  special  file  is
               completely  described by the element header and trailer
               blocks.


     Format File Notes
          Unpredictable results happen when both ``+'' and  ``&''  are
          specified.

          The meaning of ``/'' is subjective - most archiving programs
          will   archive  absolute  pathnames,  but  the  behavior  on
          extraction is undesirable (extreme measures  like  chroot(C)
          must be employed).


     See Also
          ar(CP), cpio(C), dd(C), and tar(C)


     (printed 5/17/90) (XENIX or UNIX)                 FDFIT(SCO)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026