Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

hformat(1) [debian man page]

HFORMAT(1)						      General Commands Manual							HFORMAT(1)

NAME
hformat - create a new HFS filesystem and make it current SYNOPSIS
hformat [-f] [-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 specified. The destination may be either a block device or a regular file, but it must already exist and be writable. 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 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 nth HFS partition) on the command-line. The size of the partition determines the size of the resulting volume. Partition number 0 can be specified to format the entire medium as a single filesystem without a partition map, erasing any existing parti- tion information. Since this will destroy all the partitions, the -f option must be specified to force this operation if the medium cur- rently contains a partition map. 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. The new volume will be empty and will become "current" so subsequent commands will refer to it. The current working directory for the vol- ume is set to the root of the volume. EXAMPLES
% hformat /dev/fd0 If a floppy disk is available as /dev/fd0, this formats the disk as an HFS volume named Untitled. (N.B. The floppy must already have received a low-level format by other means.) % dd if=/dev/zero of=disk.hfs bs=1k count=800 % hformat -l "Test Disk" disk.hfs This sequence creates an 800K HFS volume image in the file disk.hfs in the current directory, and names it Test Disk. % hformat -l "Loma Prieta" /dev/sd2 1 If a SCSI disk is available as /dev/sd2, this initializes the first HFS partition on the disk (which must already exist) with a new filesystem, naming the resulting volume Loma Prieta. % hformat -f /dev/sd2 0 This causes the medium accessible as /dev/sd2 to be reformatted as a single HFS volume, ignoring and erasing any existing partition information on the medium. The -f option must be specified if the medium is currently partitioned; otherwise the command will fail. 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. The smallest volume size which can be formatted with hformat is 800K. SEE ALSO
hfsutils(1), hmount(1) FILES
$HOME/.hcwd AUTHOR
Robert Leslie <rob@mars.org> HFSUTILS
08-Nov-1997 HFORMAT(1)

Check Out this Related Man Page

HFS(1)                                                        General Commands Manual                                                       HFS(1)

NAME
hfs - shell for manipulating HFS volumes SYNOPSIS
hfs [hfs-path [partition-no]] DESCRIPTION
hfs is an interactive command-oriented tool for manipulating HFS volumes. hfs is based on the Tcl interpreter, so basic Tcl constructs can be used in addition to the following commands: mount path [partition-no] The specified UNIX path is opened as an HFS volume. If a partition number n is specified and the volume source is located on a par- titioned medium, the nth discovered HFS partition will be mounted. The default partition-no is 1. umount [path] The volume previously mounted from the specified path (or the current volume, if none specified) is unmounted. vol path The volume previously mounted from the specified path is made current. info General information about the currently mounted volume is displayed. This information is also displayed automatically when the vol- ume is mounted. pwd The full path to the current working HFS directory is displayed. cd [hfs-path] The current working directory is changed to the given HFS path. If no path is given, the working directory is changed to the root of the volume. dir [hfs-path] A directory listing of the specified HFS directory is displayed. If no path is given, the contents of the current working directory are shown. mkdir hfs-path A new, empty directory is created with the specified path. rmdir hfs-path The specified directory is removed. It must be empty. create hfs-path [type [creator]] An empty file is created with the specified path. The Macintosh type and creator may be specified, or they will default to TEXT and UNIX, respectively. del hfs-path Both forks of the specified file are deleted. stat hfs-path Status information about the specified HFS path-identified entity is displayed. cat hfs-path The data fork of the specified HFS file is displayed. copyin unix-path [hfs-path [mode]] The specified UNIX file is copied to the named HFS destination path. Unless specified otherwise, the file will be copied into the current HFS working directory using a heuristically chosen mode. The mode may be one of: macb (MacBinary II), binh (BinHex), text, or raw. copyout hfs-path [unix-path [mode]] The specified HFS file is copied into the named UNIX destination path. Unless specified otherwise, the file will be copied into the current UNIX working directory using a heuristically chosen mode. The modes are the same as for copyin. format path [partition-no [volume-name]] The specified UNIX path is initialized as an empty HFS volume with the given name, and this volume is subsequently mounted. The default volume name is Untitled. The shell is scriptable, however it should be understood that the above commands are actually implemented by Tcl procedures prefixed with the character "h", e.g. hmount, hcd, etc., in order to avoid name collisions with other Tcl utilities. The "h" may be omitted in interac- tive use for convenience. SEE ALSO
hfsutils(1), xhfs(1) BUGS
cat can only display the data fork of a file. Text translations are performed unconditionally on the output. Furthermore, binary data can- not be handled properly from within Tcl scripts since the character with value 0 cannot be represented in Tcl strings. Use copyout to copy files without these limitations. AUTHOR
Robert Leslie <rob@mars.org> HFSUTILS 15-Jan-1997 HFS(1)
Man Page