File: hformat.1

package info (click to toggle)
hfsutils 3.2.6-14
  • links: PTS
  • area: main
  • in suites: buster
  • size: 1,720 kB
  • sloc: ansic: 12,857; tcl: 1,937; makefile: 566; sh: 263; perl: 29
file content (94 lines) | stat: -rw-r--r-- 2,992 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
.TH HFORMAT 1 08-Nov-1997 HFSUTILS
.SH NAME
hformat \- create a new HFS filesystem and make it current
.SH SYNOPSIS
hformat
[-f] [-l
.IR label ]
.I destination-path
.RI [ partition-no ]
.SH DESCRIPTION
.B hformat
is used to write a new HFS filesystem to a volume. A UNIX pathname to the
volume's destination must be specified. The destination may be either a block
device or a regular file, but it must already exist and be writable.
.PP
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
.BR Untitled .
.PP
If the destination medium is partitioned, one partition must be selected to
receive the filesystem. If there is only one HFS partition on the medium, it
will be selected by default. Otherwise, the desired partition number must be
specified (as the ordinal
.IR n th
HFS partition) on the command-line. The size of the partition determines the
size of the resulting volume.
.PP
Partition number
.B 0
can be specified to format the entire medium as a single filesystem without a
partition map, erasing any existing partition information. Since this will
destroy all the partitions, the
.B -f
option must be specified to force this operation if the medium currently
contains a partition map.
.PP
If the medium is not partitioned (or if partition 0 is specified), the size or
capacity of the medium determines the size of the resulting volume.
.PP
The new volume will be empty and will become "current" so subsequent commands
will refer to it. The current working directory for the volume is set to the
root of the volume.
.SH EXAMPLES
.PP
.TP
% hformat /dev/fd0
If a floppy disk is available as
.BR /dev/fd0 ,
this formats the disk as an HFS volume named
.BR Untitled .
(N.B. The floppy must already have received a low-level format by other
means.)
.TP
% dd if=/dev/zero of=disk.hfs bs=1k count=800
.PD 0
.TP
% hformat -l "Test Disk" disk.hfs
.PD 1
This sequence creates an 800K HFS volume image in the file
.B
disk.hfs
in the current directory, and names it
.BR "Test Disk" .
.TP
% hformat -l "Loma Prieta" /dev/sd2 1
If a SCSI disk is available as
.BR /dev/sd2 ,
this initializes the first HFS partition on the disk (which must already
exist) with a new filesystem, naming the resulting volume
.BR "Loma Prieta" .
.TP
% hformat -f /dev/sd2 0
This causes the medium accessible as
.B /dev/sd2
to be reformatted as a single HFS volume, ignoring and erasing any existing
partition information on the medium. The
.B -f
option must be specified if the medium is currently partitioned; otherwise the
command will fail.
.SH NOTES
This command does not create or alter partition maps, although it can erase
them (as described above). Any partition number specified on the command line
must already exist.
.PP
The smallest volume size which can be formatted with
.B hformat
is 800K.
.SH SEE ALSO
hfsutils(1), hmount(1)
.SH FILES
$HOME/.hcwd
.SH AUTHOR
Robert Leslie <rob@mars.org>