1HFORMAT(1) General Commands Manual HFORMAT(1)
2
3
4
6 hformat - create a new HFS filesystem and make it current
7
9 hformat [-f] [-l label] destination-path [partition-no]
10
12 hformat is used to write a new HFS filesystem to a volume. A UNIX path‐
13 name to the volume's destination must be specified. The destination may
14 be either a block device or a regular file, but it must already exist
15 and be writable.
16
17 An optional label can be specified to name the volume. The name must be
18 between 1-27 characters and cannot contain a colon (:). By default, the
19 volume will be named Untitled.
20
21 If the destination medium is partitioned, one partition must be
22 selected to receive the filesystem. If there is only one HFS partition
23 on the medium, it will be selected by default. Otherwise, the desired
24 partition number must be specified (as the ordinal nth HFS partition)
25 on the command-line. The size of the partition determines the size of
26 the resulting volume.
27
28 Partition number 0 can be specified to format the entire medium as a
29 single filesystem without a partition map, erasing any existing parti‐
30 tion information. Since this will destroy all the partitions, the -f
31 option must be specified to force this operation if the medium cur‐
32 rently contains a partition map.
33
34 If the medium is not partitioned (or if partition 0 is specified), the
35 size or capacity of the medium determines the size of the resulting
36 volume.
37
38 The new volume will be empty and will become "current" so subsequent
39 commands will refer to it. The current working directory for the volume
40 is set to the root of the volume.
41
43 % hformat /dev/fd0
44 If a floppy disk is available as /dev/fd0, this formats the disk
45 as an HFS volume named Untitled. (N.B. The floppy must already
46 have received a low-level format by other means.)
47
48 % dd if=/dev/zero of=disk.hfs bs=1k count=800
49 % hformat -l "Test Disk" disk.hfs
50 This sequence creates an 800K HFS volume image in the file
51 disk.hfs in the current directory, and names it Test Disk.
52
53 % hformat -l "Loma Prieta" /dev/sd2 1
54 If a SCSI disk is available as /dev/sd2, this initializes the
55 first HFS partition on the disk (which must already exist) with
56 a new filesystem, naming the resulting volume Loma Prieta.
57
58 % hformat -f /dev/sd2 0
59 This causes the medium accessible as /dev/sd2 to be reformatted
60 as a single HFS volume, ignoring and erasing any existing parti‐
61 tion information on the medium. The -f option must be specified
62 if the medium is currently partitioned; otherwise the command
63 will fail.
64
66 This command does not create or alter partition maps, although it can
67 erase them (as described above). Any partition number specified on the
68 command line must already exist.
69
70 The smallest volume size which can be formatted with hformat is 800K.
71
73 hfsutils(1), hmount(1)
74
76 $HOME/.hcwd
77
79 Robert Leslie <rob@mars.org>
80
81
82
83HFSUTILS 08-Nov-1997 HFORMAT(1)