hformat - create a new HFS filesystem and make it current


SYNOPSIS

       hformat [-l label] destination-path [partition-no]


DESCRIPTION

       hformat is used to write a new HFS filesystem to a volume.
       A UNIX pathname to the volume's destination must be speci-
       fied.  The  destination  may be either a block device or a
       regular file, but must already exist and be writable.  (If
       a  regular file, the size of the file determines the maxi-
       mum size of the resulting volume image.)

       An optional label can be specified to name the volume. The
       name  must be between 1-27 characters and cannot contain a
       colon (:). By default, the volume will be named  Untitled.

       If  a  partition number n is specified, the nth HFS parti-
       tion in the existing medium will receive  the  filesystem.
       By  default,  and  also  when  n  is  0, the entire medium
       (entire file or entire block  device)  will  be  formatted
       with  the  new filesystem. If a partition is specified, it
       must already exist.

       The new volume will be empty, but will also  become  "cur-
       rent" so subsequent commands will refer to it. The current
       working directory for the volume is set to the root of the
       volume.


EXAMPLES

       % dd if=/dev/zero of=disk.hfs bs=1k count=800

       % hformat disk.hfs
              This  sequence  creates an 800K HFS volume image in
              the file disk.hfs in  the  current  directory,  and
              names it Untitled.

       % hformat /dev/fd0
              If  a  floppy  disk  is available as /dev/fd0, this
              formats the disk to its maximum capacity as an  HFS
              volume  named  Untitled.   (N.B.  The  floppy  must
              already have received a low-level format  by  other
              means.)

       % hformat -l "Loma Prieta" /dev/sd2 1
              If  a SCSI disk is available as /dev/sd2, this ini-
              tializes the first HFS partition on the disk (which
              must  already  exist) with a new filesystem, naming
              the resulting volume Loma Prieta.


NOTES

       The smallest volume size which can be formatted with hfor-
       hfsutils(1), hmount(1)


FILES

       $HOME/.hcwd


AUTHOR

       Robert Leslie <rob@mars.org>