1HFS(1) General Commands Manual HFS(1)
2
3
4
6 hfs - shell for manipulating HFS volumes
7
9 hfs [hfs-path [partition-no]]
10
12 hfs is an interactive command-oriented tool for manipulating HFS vol‐
13 umes. hfs is based on the Tcl interpreter, so basic Tcl constructs can
14 be used in addition to the following commands:
15
16 mount path [partition-no]
17 The specified UNIX path is opened as an HFS volume. If a parti‐
18 tion number n is specified and the volume source is located on a
19 partitioned medium, the nth discovered HFS partition will be
20 mounted. The default partition-no is 1.
21
22 umount [path]
23 The volume previously mounted from the specified path (or the
24 current volume, if none specified) is unmounted.
25
26 vol path
27 The volume previously mounted from the specified path is made
28 current.
29
30 info General information about the currently mounted volume is dis‐
31 played. This information is also displayed automatically when
32 the volume is mounted.
33
34 pwd The full path to the current working HFS directory is displayed.
35
36 cd [hfs-path]
37 The current working directory is changed to the given HFS path.
38 If no path is given, the working directory is changed to the
39 root of the volume.
40
41 dir [hfs-path]
42 A directory listing of the specified HFS directory is displayed.
43 If no path is given, the contents of the current working direc‐
44 tory are shown.
45
46 mkdir hfs-path
47 A new, empty directory is created with the specified path.
48
49 rmdir hfs-path
50 The specified directory is removed. It must be empty.
51
52 create hfs-path [type [creator]]
53 An empty file is created with the specified path. The Macintosh
54 type and creator may be specified, or they will default to TEXT
55 and UNIX, respectively.
56
57 del hfs-path
58 Both forks of the specified file are deleted.
59
60 stat hfs-path
61 Status information about the specified HFS path-identified
62 entity is displayed.
63
64 cat hfs-path
65 The data fork of the specified HFS file is displayed.
66
67 copyin unix-path [hfs-path [mode]]
68 The specified UNIX file is copied to the named HFS destination
69 path. Unless specified otherwise, the file will be copied into
70 the current HFS working directory using a heuristically chosen
71 mode. The mode may be one of: macb (MacBinary II), binh (Bin‐
72 Hex), text, or raw.
73
74 copyout hfs-path [unix-path [mode]]
75 The specified HFS file is copied into the named UNIX destination
76 path. Unless specified otherwise, the file will be copied into
77 the current UNIX working directory using a heuristically chosen
78 mode. The modes are the same as for copyin.
79
80 format path [partition-no [volume-name]]
81 The specified UNIX path is initialized as an empty HFS volume
82 with the given name, and this volume is subsequently mounted.
83 The default volume name is Untitled.
84
85 The shell is scriptable, however it should be understood that the above
86 commands are actually implemented by Tcl procedures prefixed with the
87 character "h", e.g. hmount, hcd, etc., in order to avoid name colli‐
88 sions with other Tcl utilities. The "h" may be omitted in interactive
89 use for convenience.
90
92 hfsutils(1), xhfs(1)
93
95 cat can only display the data fork of a file. Text translations are
96 performed unconditionally on the output. Furthermore, binary data can‐
97 not be handled properly from within Tcl scripts since the character
98 with value 0 cannot be represented in Tcl strings. Use copyout to copy
99 files without these limitations.
100
102 Robert Leslie <rob@mars.org>
103
104
105
106HFSUTILS 15-Jan-1997 HFS(1)