annotate docs/nitros9guide/chap3.chapter @ 3158:927ba5ebc06e

mc09 l2: move MMU bit-field defines to defs file.
author Neal Crook <foofoobedoo@gmail.com>
date Thu, 06 Apr 2017 21:43:58 +0100
parents b00cf13c9f61
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1 <chapter>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
2 <title>The NitrOS-9 File System</title>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
3 <section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
4 <title>Introduction to the Unified Input/Output System</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
5 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
6 NitrOS-9 has a unified input/output system in which data transfers to
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
7 ALL I/O devices are performed in almost exactly the same manner,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
8 regardless of the particular hardware devices involved. It may seem
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
9 that the different operational characteristics of the I/O devices
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
10 might make this difficult. After all, line printers and disk drives
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
11 behave much differently. However, these differences can mostly be
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
12 overcome by defining a set of standardized
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
13 <emphasis>logical functions</emphasis> for
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
14 all devices and by making all I/O devices conform to these
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
15 conventions, using software routines to eliminate hardware
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
16 dependencies wherever possible. This produces a much simpler and
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
17 more versatile input/output system.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
18 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
19 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
20 NitrOS-9's unified I/O system is based upon logical entities called
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
21 &quot;I/O paths&quot;. Paths are analogous to &quot;software I/O channels&quot; which
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
22 can be routed from a program to a mass-storage file, any other I/O
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
23 device, or even another program. Another way to say the same thing
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
24 is that paths are files, and all I/O devices behave as files.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
25 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
26 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
27 Data transferred through paths may be processed by NitrOS-9 to
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
28 conform to the hardware requirements of the specific I/O device
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
29 involved. Data transfers can be either bidirectional (read/write)
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
30 or unidirectional (read only or write only), depending on the device
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
31 and/or how the path was established.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
32 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
33 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
34 Data transferred through a path is considered to be a stream of
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
35 8-bit binary bytes that have no specific type or value: what the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
36 data actually represents depends on how it is used by each program.
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
37 This is important because it means that NitrOS-9 does not require data
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
38 to have any special format or meaning.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
39 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
40 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
41 Some of the advantages of the unified I/O system are:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
42 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
43 <itemizedlist mark="square">
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
44 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
45 Programs will operate correctly regardless of the particular I/O
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
46 devices selected and used when the program is actually executed.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
47 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
48 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
49 Programs are highly portable from one computer to another, even
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
50 when the computers have different kinds of I/O devices.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
51 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
52 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
53 I/O can be redirected to alternate files or devices when the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
54 program is run, without having to alter the program.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
55 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
56 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
57 New or special device driver routines can easily be created and
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
58 installed by the user.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
59 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
60 </itemizedlist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
61 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
62
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
63 <section id="sec3.1">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
64 <title>Pathlists: How Paths Are Named</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
65 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
66 Whenever a path is established (or &quot;opened&quot;), NitrOS-9 must be given
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
67 a description of the &quot;routing&quot; of the path. This description is
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
68 given in the form of a character string called a &quot;pathlist&quot;. It
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
69 specifies a particular mass-storage file, directory file, or any
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
70 other I/O device. NitrOS-9 &quot;pathlists&quot; are
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
71 similar to &quot;filenames&quot; used
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
72 by other operating systems.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
73 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
74 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
75 The name &quot;pathlist&quot; is used instead
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
76 of &quot;pathname&quot; or &quot;filename&quot;
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
77 because in many cases it is a list consisting of more than one name
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
78 to specify a particular I/O device or file. In order to convey all
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
79 the information required, a pathlist may include a device name, one
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
80 or more directory file names and a data file name. Each name within
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
81 a pathlist is separated by slash &quot;/&quot; characters.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
82 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
83 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
84 Names are used to describe three kinds of things:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
85
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
86 <itemizedlist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
87 <listitem><para>Names of Physical I/O Devices</para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
88 <listitem><para>Names of Regular Files</para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
89 <listitem><para>Names of Directory Files</para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
90 </itemizedlist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
91
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
92
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
93 Names can have one to 29 characters, all of which are used for
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
94 matching. They may be composed of any combination of the following characters:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
95 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
96
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
97 <simplelist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
98 <member>uppercase letters: A - Z</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
99 <member>lowercase letters: a - z</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
100 <member>decimal digits: 0 - 9</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
101 <member>underscore: _</member>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
102 <member>period: . (cannot be the first character)</member>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
103 </simplelist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
104
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
105 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
106 Here are examples of <emphasis>legal</emphasis> names:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
107 <informaltable frame="none">
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
108 <tgroup cols="2">
644
41e412b40024 XMLified.
roug
parents: 149
diff changeset
109 <colspec colwidth="2.5in"/>
41e412b40024 XMLified.
roug
parents: 149
diff changeset
110 <colspec colwidth="2.5in"/>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
111 <tbody>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
112 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
113 <entry>raw.data.2</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
114 <entry>projectreview.backup</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
115 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
116 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
117 <entry>reconciliation.report</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
118 <entry>X042953</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
119 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
120 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
121 <entry>RJJones</entry>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
122 <entry>22search.bin</entry>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
123 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
124 </tbody>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
125 </tgroup>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
126 </informaltable>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
127
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
128 Here are examples of <emphasis>illegal</emphasis> names:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
129
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
130 <informaltable frame="none">
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
131 <tgroup cols="2">
644
41e412b40024 XMLified.
roug
parents: 149
diff changeset
132 <colspec colwidth="3.1in"/>
41e412b40024 XMLified.
roug
parents: 149
diff changeset
133 <colspec colwidth="2.0in"/>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
134 <tbody>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
135 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
136 <entry>max*min</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
137 <entry>(* is not a legal character)</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
138 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
139 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
140 <entry>.data</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
141 <entry>(does not start with a letter)</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
142 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
143 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
144 <entry>open orders</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
145 <entry>(cannot contain a space)</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
146 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
147 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
148 <entry>this.name.obviously.has.more.than.29.characters</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
149 <entry>(too long)</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
150 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
151 </tbody>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
152 </tgroup>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
153 </informaltable>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
154 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
155 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
156
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
157 <section id="sec3.2">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
158 <title>I/O Device Names</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
159 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
160 Each physical input/output device supported by the system must
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
161 have a unique name. The actual names used are defined when the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
162 system is set up and cannot be changed while the system is running.
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
163 The device names used for the Color Computer are:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
164 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
165 <informaltable frame="none">
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
166 <tgroup cols="2">
644
41e412b40024 XMLified.
roug
parents: 149
diff changeset
167 <colspec colwidth="0.7in"/>
41e412b40024 XMLified.
roug
parents: 149
diff changeset
168 <colspec colwidth="2in"/>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
169 <tbody>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
170 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
171 <entry>TERM</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
172 <entry>Video display/keyboard</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
173 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
174 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
175 <entry>P</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
176 <entry>Printer port</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
177 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
178 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
179 <entry>D0</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
180 <entry>Disk drive unit zero</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
181 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
182 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
183 <entry>D1</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
184 <entry>Disk drive unit one</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
185 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
186 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
187 <entry>PIPE</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
188 <entry>Pipes</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
189 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
190 </tbody>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
191 </tgroup>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
192 </informaltable>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
193 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
194 Device names may only be used as the first name of a pathlist,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
195 and must be preceded by a slash &quot;/&quot; character to indicate that the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
196 name is that of an I/O device. If the device is not a disk or
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
197 similar device the device name is the only name allowed. This is
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
198 true for devices such as terminals, printers, etc. Some examples of
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
199 of pathlists that refer to I/O devices are:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
200 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
201
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
202 <simplelist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
203 <member>/TERM</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
204 <member>/P</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
205 <member>/D1</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
206 </simplelist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
207
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
208 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
209 I/O device names are actually the names of the &quot;device descriptor
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
210 modules&quot; kept by NitrOS-9 in an internal data structure called the
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
211 &quot;module directory&quot; (See the NitrOS-9 System Programmer's manual for more
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
212 information about device driver and descriptor modules). This
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
213 directory is automatically set up during NitrOS-9's system start up
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
214 sequence, and updated as modules are added or deleted while the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
215 system is running.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
216 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
217 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
218
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
219 <section id="sec3.3">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
220 <title>Multifile Devices And Directory Files</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
221 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
222 Multifile devices are mass storage devices (usually disk systems)
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
223 that store data organized into separate logical entities called
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
224 &quot;files&quot;. Each file has a name which is entered in a directory file.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
225 Every multifile device has a master directory (called the &quot;root
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
226 directory&quot;) that includes the names of the files and sub-directories
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
227 stored on the device. The root directory is created automatically
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
228 when the disk is initialized by the <command>format</command> command.
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
229 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
230 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
231 Pathlists that refer to multifile devices may have more than one
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
232 name. For example, to refer to the file &quot;mouse&quot; whose name appears
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
233 in the root directory of device &quot;D1&quot; (disk drive one) the following
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
234 pathlist is used:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
235 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
236 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
237
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
238 /d1/mouse
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
239
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
240 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
241 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
242 When NitrOS-9 is asked to create a path, it uses the names in the
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
243 pathlist sequentially from left to right to search various
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
244 directories to obtain the necessary routing information. These
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
245 directories are organized as a tree-structured hierarchy. The
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
246 highest-level directory is called the &quot;device directory&quot;, which
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
247 contains names and linkages to all the I/O devices on a given
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
248 system. If any of the devices are of a multifile type they each
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
249 have a root directory, which is the next-highest level.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
250 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
251 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
252 The diagram below is a simplified file system tree of a typical
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
253 NitrOS-9 system disk. Note that device and directory names are capitalized
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
254 and ordinary file names are not. This is a customary (but
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
255 not mandatory) practice which allows you to easily identify directory
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
256 files using the short form of the <command>dir</command> command.
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
257 </para>
644
41e412b40024 XMLified.
roug
parents: 149
diff changeset
258 <literallayout class="monospaced">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
259 System Device Directory
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
260 +---------------------------------+
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
261 ! ! ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
262 D0 TERM P D1
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
263 ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
264 ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
265 ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
266 D0 Root Directory D1 Root Directory
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
267 +----------------------+ +----------------------+
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
268 ! ! ! ! ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
269 DEFS startup CMDS file1 file2 file3
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
270 ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
271 ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
272 ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
273 --+-- +-----+----+-----+-----+
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
274 ! ! ! ! ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
275 OS9Defs copy list dir del backup
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
276 </literallayout>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
277 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
278 The device names in this example system are &quot;TERM&quot;,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
279 &quot;P&quot;, &quot;D0&quot; and
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
280 &quot;D1&quot;. The root directory of device
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
281 &quot;D0&quot; includes two directory
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
282 files, <filename class="directory">DEFS</filename> and <filename class="directory">CMDS</filename>, and one ordinary file &quot;startup&quot;. Notice that
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
283 device &quot;D1&quot; has in its root directory three ordinary files. In
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
284 order to access the file &quot;file2&quot; on
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
285 device &quot;d1&quot;, a pathlist having
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
286 two names must be used:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
287 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
288 list /d1/file2
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
289 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
290 To construct a pathlist to access the file &quot;dir&quot; on device
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
291 &quot;d0&quot; it is necessary to include in the pathlist the name of the
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
292 intermediate directory file <filename class="directory">CMDS</filename>. For example, to copy this file
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
293 requires a pathlist having three names to describe the &quot;from&quot; file:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
294 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
295 copy /d0/cmds/dir temp
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
296 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
297 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
298 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
299
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
300 <section id="sec3.4">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
301 <title>Creating and Using Directories</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
302 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
303 It is possible to create a virtually unlimited number of levels
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
304 of directories on a mass storage device using the <command>makdir</command> command.
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
305 Directories are a special type of file (see <xref linkend="sec3.8.1"/>). They can be
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
306 processed by the same I/O functions used to access regular files
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
307 which makes directory-related processing fairly simple.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
308 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
309 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
310 To demonstrate how directories work, assume that the disk in
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
311 drive one (&quot;d1&quot;) has been freshly formatted so that it has a root
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
312 directory only. The <command>build</command> command can be used to create a text file
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
313 on &quot;d1&quot;. The <command>build</command> command will print out &quot;?&quot; as a prompt to
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
314 indicate that it is waiting for a text line to be entered. It will
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
315 place each line into the text file until an empty line with only a
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
316 carriage return is entered, as shown below:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
317 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
318 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
319 OS9: build /d1/file1
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
320 ? This is the first file that
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
321 ? we created.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
322 ? [ENTER]
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
323 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
324
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
325 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
326 The <command>dir</command> command will now indicate the existence of the new file:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
327 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
328
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
329 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
330 OS9: dir /d1
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
331
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
332 Directory of /d1 15:45:29
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
333 file1
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
334 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
335
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
336 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
337 The <command>list</command> command can be used to display the text stored in the
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
338 file:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
339 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
340
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
341 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
342 OS9: list /d1/file1
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
343
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
344 This is the first file
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
345 that we created.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
346 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
347
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
348 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
349 The <command>build</command> command again is again used to create two more text
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
350 files:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
351 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
352
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
353 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
354 OS9: build /d1/file2
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
355 ? This is the second file
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
356 ? that we created.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
357 ? [ENTER]
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
358
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
359 OS9: build /d1/file3
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
360 ? This is another file.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
361 ? [ENTER]
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
362 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
363
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
364 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
365 The <command>dir</command> command will now show three file names:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
366 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
367
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
368 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
369 OS9: dir /d1
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
370 Directory of /D1 15:52:29
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
371 file1 file2 file3
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
372 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
373
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
374 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
375 To make a new directory in this directory, the <command>makdir</command> command is
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
376 used. The new directory will be called <filename class="directory">NEWDIR</filename>. Notice that
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
377 throughout this manual directory names are always capitalized. This
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
378 is <emphasis>not</emphasis> a requirement of NitrOS-9 (see <xref linkend="sec3.1"/>) . Rather, it is a
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
379 practice popular with many NitrOS-9 users because it allows easy identification
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
380 of directory files at all times (assuming all other file names use
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
381 lower-case letters).
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
382 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
383
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
384 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
385 OS9: makdir /D1/NEWDIR
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
386 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
387
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
388 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
389 The directory file <filename class="directory">NEWDIR</filename> is now a file listed in D1's root
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
390 directory:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
391 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
392
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
393 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
394 OS9: dir /D1
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
395
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
396 Directory of /D1 16:04:31
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
397 file1 file2 file3 NEWDIR
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
398 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
399
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
400 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
401 Now we will create a new file and put in the new directory, using
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
402 the <command>copy</command> command to duplicate <filename>file1</filename>:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
403 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
404 <screen>
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
405 OS9: copy /d1/file1 /d1/newdir/file1.copy
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
406 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
407 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
408 Observe that the second pathlist now has three names: the name of
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
409 the root directory (&quot;D1&quot;), the name of the next lower directory
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
410 (<filename class="directory">NEWDIR</filename>), then the actual file name (<filename class="directory">file1.copy</filename>). Here's what
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
411 the directories look like now:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
412 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
413 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
414 D1 Root Directory
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
415 +---------+--------+--------+
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
416 ! ! ! !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
417 NEWDIR file1 file2 file3
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
418 !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
419 !
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
420 file1.copy
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
421 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
422 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
423 The <command>dir</command> command can now show the files in the new directory:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
424 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
425 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
426 OS9: dir /D1/NEWDIR
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
427
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
428 Directory of /D1/NEWDIR
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
429 file1.copy
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
430 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
431 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
432 It is possible to use <command>makdir</command> to create additional new directories
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
433 within <filename class="directory">NEWDIR</filename>, and so on, limited only by available disk
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
434 space.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
435 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
436 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
437
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
438 <section id="sec3.5">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
439 <title>Deleting Directory Files</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
440 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
441 The <command>del</command> command cannot be used to directly delete a directory
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
442 file. If a directory file that still contained file names were to
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
443 be deleted, NitrOS-9 would have no way to access the files or to return
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
444 their storage to the unallocated storage pool. Therefore, the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
445 following sequence must be performed to delete a directory file:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
446 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
447 <para>
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
448 1. All file names in the directory must be deleted.
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
449 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
450 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
451 2. The <command>attr</command> command is used to turn off the files directory
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
452 attrribute (-d option), making it an ordinary file (see <xref linkend="sec3.8"/>).
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
453 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
454 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
455 3. The file may now be deleted using the <command>del</command> command.
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
456 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
457 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
458 A simpler alternative is to use the <command>deldir</command> command to automatically
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
459 perform all these steps for you.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
460 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
461 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
462
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
463 <section id="sec3.6">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
464 <title>Additional Information About Directories</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
465 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
466 The NitrOS-9 directory system is very useful because it allows each
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
467 user to privately organize files as desired (by project, function,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
468 etc.), without affecting other files or other user's files. Another
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
469 advantage of the hierarchical directory system is that files with
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
470 identical names can be kept on the same device as long as the names
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
471 are in different directories. For example, you can have a set of
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
472 test files to check out a program using the same file names as the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
473 program's actual working files. You can then run the program with
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
474 test data or actual data simply by switching directories.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
475 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
476 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
477 Here are some important characteristics relating to use of directory
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
478 files:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
479 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
480 <itemizedlist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
481 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
482 Directories have the same ownership and security attributes
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
483 and rules as regular files.
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
484 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
485 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
486 The name of a given file appears in exactly one directory.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
487 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
488 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
489 Files can only be added to directories when they are created.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
490 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
491 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
492 A file and the directory in which its name is kept must reside on
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
493 the same device.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
494 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
495 </itemizedlist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
496 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
497
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
498 <section id="sec3.7">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
499 <title>Using and Changing Working Directories</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
500 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
501 Each program (process) has two &quot;working directories&quot; associated
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
502 with it at all times: a &quot;data directory&quot; and an &quot;execution
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
503 directory&quot;. The working directory mechanism allows the name searching
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
504 involved in pathlist processing to start at any level (subtree)
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
505 of the file system hierarchy. Any directory that the user has
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
506 permission to access (see <xref linkend="sec3.8"/>) can be made a working directory.
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
507 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
508 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
509 The rules used to determine whether pathlists refer to the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
510 current working directory or not are simple:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
511 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
512 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
513 ---&gt; When the first character of a pathlist IS a &quot;/&quot;,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
514 processing of the pathlist starts at the device directory,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
515 e.g., the first name MUST be a device name.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
516 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
517 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
518 ---&gt; When the first character of a pathlist IS NOT a &quot;/&quot;,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
519 processing of the pathlist starts at the current working
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
520 directory.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
521 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
522 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
523 Notice that pathlists starting with a &quot;/&quot;
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
524 <emphasis>must</emphasis> be complete, in
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
525 other words, they must have all names required to trace the pathlist
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
526 from the device directory down through all intermediate directories
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
527 (if any). For example:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
528 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
529 <informalexample>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
530 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
531 /d2/JOE/WORKINGFILES/testresults
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
532 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
533 </informalexample>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
534 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
535 On the other hand, use of the current working directory allows
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
536 all names in the file hierarchy tree to be implied instead of
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
537 explicitly given. This not only makes pathlists shorter, but allows
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
538 NitrOS-9 to locate files faster because (typically) fewer directories
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
539 need be searched. For example, if the current working directory is
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
540 <filename class="directory">/D1/PETE/GAMES</filename> and a pathlist is given such as:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
541 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
542 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
543 baseball
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
544 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
545 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
546 the actual pathlist <emphasis>implied</emphasis> is:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
547 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
548 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
549 /D1/PETE/GAMES/baseball
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
550 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
551 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
552 Pathlists using working directories can also specify additional
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
553 lower-level directories. Referring to the example above, the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
554 pathlist:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
555 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
556 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
557 ACTION/racing
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
558 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
559 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
560 implies the complete pathlist:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
561 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
562 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
563 /D1/PETE/GAMES/ACTION/racing
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
564 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
565
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
566 <section id="sec3.7.1">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
567 <title>Automatic Selection of Working Directories</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
568 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
569 Recall that two working directories are referred to as the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
570 &quot;current execution directory&quot; and the &quot;current data directory&quot;. The
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
571 reason two working directories are maintained is so that files
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
572 containing
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
573 <emphasis>programs</emphasis> can be organized in different directories than
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
574 files containing <emphasis>data</emphasis>.
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
575 NitrOS-9 automatically selects either working
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
576 directory, depending on the usage of the pathlist:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
577 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
578 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
579 ---&gt; NitrOS-9 will search the execution directory when it attempts to
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
580 load files into memory assumed to be executable programs. This
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
581 means that programs to be run as commands or loaded into
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
582 memory must be in the current execution directory.
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
583 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
584 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
585 ---&gt; The data directory is used for all other file references (such
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
586 as text files, etc.)
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
587 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
588 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
589 Immediately after startup, NitrOS-9 will set the data directory to be
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
590 (the root directory of) the system disk drive (usually &quot;D0&quot;), and
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
591 the working directory to be a directory called <filename class="directory">cmds</filename> on the same
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
592 drive (<filename class="directory">/D0/cmds</filename>). On timesharing systems, the <command>login</command> command
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
593 selects the initial execution and data directories to the file names
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
594 specified in each user's information record stored in the system
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
595 password file(ref. <xref linkend="sec5.4.2"/>).
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
596 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
597 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
598 Here is an example of a <command>shell</command> command statement using the default
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
599 working directory notation, and its equivalent expansion:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
600 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
601 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
602 copy file1 file2
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
603 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
604 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
605 If the current execution directory is <filename class="directory">/D0/CMDS</filename> and the current
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
606 data directory is <filename class="directory">/D0/JONES</filename>, the same command, fully expanded to
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
607 show complete pathlists implied is:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
608 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
609 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
610 OS9: /D0/CMDS/copy /D0/JONES/filel /D0/JONES/file2
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
611 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
612 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
613 Notice that the first pathlist <command>copy</command> expands to the current working
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
614 directory pathlist because it is assumed to be an executable program
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
615 but the two other file names expand using the data directory because
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
616 they are not assumed to be executable.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
617 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
618 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
619
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
620 <section id="sec3.7.2">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
621 <title>Changing Current Working Directories</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
622 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
623 The built-in shell commands <command>chd</command> and <command>chx</command> can be used to
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
624 independently change the current working data and execution
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
625 directories, respectively. These command names must be followed by
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
626 a pathlist that describes the new directory file. You must have
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
627 permission to access the directory according to normal file security
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
628 rules. Here are some examples:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
629 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
630 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
631 OS9: chd /D1/MY.DATAFILES
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
632
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
633 OS9: chx /D0/TESTPROGRAMS
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
634 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
635 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
636 When using the <command>chd</command> or <command>chx</command> commands, pathlists work the same as they
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
637 do for regular files, except for the last name in the pathlist must
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
638 be a directory name. If the pathlist begins with a &quot;/&quot; , NitrOS-9 will
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
639 begin searching in the device directory for the new working
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
640 directory, otherwise searching will begin with the present directory.
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
641 For example, the following sequence of commands set the
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
642 working directory to the same file:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
643 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
644 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
645 OS9: CHD /D1/SARAH
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
646 OS9: CHD PROJECT1
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
647
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
648 OS9: CHD /D1/SARAH/PROJECT1 (same effect as above)
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
649 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
650 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
651
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
652 <section id="sec3.7.3">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
653 <title>Anonymous Directory Names</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
654 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
655 Sometimes is useful to be able to refer to the current directory
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
656 or the next higher-level directory, but its name (full pathlist) may
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
657 not be known. Because of this, special &quot;name substitutes&quot; are
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
658 available. They are:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
659 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
660 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
661 <filename class="directory">.</filename> refers to the present working directory
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
662 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
663 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
664 <filename class="directory">..</filename> refers to the directory that contains the name of the present
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
665 directory (e.g., the next highest level directory)
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
666 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
667 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
668 <filename class="directory">...</filename> refers to directory two levels up, and so on
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
669 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
670 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
671 These can be used in place of pathlists and/or the first name in a
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
672 pathlist. Here are some examples:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
673 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
674 <informaltable frame="none">
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
675 <tgroup cols="2">
644
41e412b40024 XMLified.
roug
parents: 149
diff changeset
676 <colspec colwidth="1.5in"/>
41e412b40024 XMLified.
roug
parents: 149
diff changeset
677 <colspec colwidth="3in"/>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
678 <tbody>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
679 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
680 <entry>OS9: dir .</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
681 <entry>lists file names in the working data directory</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
682 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
683 <row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
684 <entry>OS9: dir ..</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
685 <entry>lists names in the working data directory's parent directory.</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
686 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
687 <row>
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
688 <entry>OS9: del ../temp</entry>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
689 <entry>deletes the file <filename>temp</filename> from the
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
690 working data directory's parent directory.</entry>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
691 </row>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
692 </tbody>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
693 </tgroup>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
694 </informaltable>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
695 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
696 The substitute names refer to either the execution or data
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
697 directories, depending on the context in which they are used.
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
698 For example, if <filename class="directory">..</filename> is used in a pathlist of a file which
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
699 will be loaded and/or executed, it will represent the parent
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
700 directory of the execution directory. Likewise, if <filename class="directory">.</filename> is used in a
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
701 pathlist describing a program's input file, it will represent the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
702 current data directory.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
703 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
704 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
705 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
706
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
707 <section id="sec3.8">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
708 <title>The File Security System</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
709 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
710 Every file (including directory files) has properties called
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
711 <emphasis>ownership</emphasis>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
712 and <emphasis>attributes</emphasis> which determine who may access the file and
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
713 how it many be used.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
714 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
715 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
716 NitrOS-9 automatically stores with each file the user number
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
717 associated with the process that created it. This user is considered
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
718 to be the &quot;owner&quot; of the file.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
719 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
720 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
721 Usage and security functions are based on &quot;attributes&quot;, which
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
722 define how and by whom the file can be accessed. There are a total
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
723 of seven attributes, each of which can be turned &quot;off&quot; or
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
724 &quot;on&quot;
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
725 independently. The &quot;d&quot; attribute is used to indicate (when on) that
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
726 the file is a directory file. The other six attributes control
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
727 whether the file can be read, written to, or executed, by either the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
728 owner or by the &quot;public&quot; (all other users). Specifically, these six
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
729 attributes are:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
730 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
731 <para>
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
732 WRITE PERMISSION FOR OWNER: If on, the owner may write to the file
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
733 or delete it. This permission can be used to protect important
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
734 files from accidental deletion or modification.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
735 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
736 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
737 READ PERMISSION FOR OWNER: If on, the owner is allowed to read
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
738 from the file. This can be used to prevent &quot;binary&quot; files from
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
739 being used as &quot;text&quot; files
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
740 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
741 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
742 EXECUTE PERMISSION FOR OWNER: If on, the owner can load the file into memory
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
743 and execute it. Note that the file <emphasis>must</emphasis> contain one or
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
744 more valid NitrOS-9 format memory modules in order to actually load
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
745 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
746 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
747 The following &quot;public permissions&quot; work the same way as
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
748 the &quot;owner permissions&quot; above but are applied to processes having
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
749 DIFFERENT user numbers than the file's owner.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
750 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
751 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
752 WRITE PERMISSION FOR PUBLIC: If on, any other user may write to or
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
753 delete the file.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
754 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
755 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
756 READ PERMISSION FOR PUBLIC: If on, any other user may read (and
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
757 possibly copy) the file.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
758 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
759 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
760 EXECUTE PERMISSION FOR PUBLIC: If on, any other user may execute
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
761 the file.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
762 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
763 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
764 For example, if a particular file had all permissions on except
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
765 &quot;write permit to public&quot; and &quot;read permit to public&quot;, the owner
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
766 would have unrestricted access to the file, but other users could
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
767 execute it, but not read, copy, delete, or alter it.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
768 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
769
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
770 <section id="sec3.8.1">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
771 <title>Examining and Changing File Attributes</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
772 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
773 The <command>dir</command> command may be used to examine the security permissions
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
774 of the files in any particular directory when the &quot;e&quot; option is
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
775 used. An example using the <command>dir e</command> command to show the detailed
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
776 attributes of the files in the current working directory is:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
777 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
778 <screen>
1017
c9b63a3c0a17 More changes
boisy
parents: 1011
diff changeset
779 Directory of . 2003/03/04 10:20
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
780
1017
c9b63a3c0a17 More changes
boisy
parents: 1011
diff changeset
781 Owner Last Modified Attributes Sector Bytecount Name
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
782 ----- ----------------- ---------- ------ --------- ----
1017
c9b63a3c0a17 More changes
boisy
parents: 1011
diff changeset
783 1 2002/05/29 14:02 --e--e-r 47 42 file1
c9b63a3c0a17 More changes
boisy
parents: 1011
diff changeset
784 0 2002/10/12 02:15 ---wr-wr 48 43 file2
c9b63a3c0a17 More changes
boisy
parents: 1011
diff changeset
785 3 2002/04/29 23:35 -s----wr 51 22 file3
c9b63a3c0a17 More changes
boisy
parents: 1011
diff changeset
786 1 2003/01/06 16:19 d-ewrewr 6D 800 NEWDIR
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
787 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
788
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
789 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
790 This display is fairly self-explanatory. The &quot;attributes&quot; column
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
791 shows which attributes are currently on by the presence or absence
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
792 of associated characters in the following format:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
793 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
794 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
795 dsewrewr
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
796 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
797
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
798 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
799 The character positions correspond to from left to right: directory;
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
800 sharable; public execute; public write; public read; owner execute;
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
801 owner write; owner read. The <command>attr</command> command is used to examine or
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
802 change a file's attributes. Typing <command>attr</command> followed by a file name
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
803 will result in the present attributes to be displayed, for example:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
804 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
805
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
806 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
807 OS9: attr file2
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
808 -s-wr-ewr
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
809 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
810
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
811 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
812 If the command is used with a list of one or more attribute abbreviations,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
813 the file's attributes will be changed accordingly (if
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
814 legal). For example, the command:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
815 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
816 <screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
817 OS9: attr file2 pw pr -e -pe
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
818 </screen>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
819 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
820 enables public write and public read permissions and removes execute
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
821 permission for both the owner and the public.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
822 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
823 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
824 The &quot;directory&quot; attribute behaves somewhat differently than the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
825 read, write, and execute permissions. This is because it would be
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
826 quite dangerous to be able to change directory files to normal files,
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
827 and creation of a directory requires special initialization.
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
828 Therefore, the <command>attr</command> command
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
829 <emphasis>cannot</emphasis> be used to turn
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
830 the directory (d) attribute on (only <command>makdir</command> can), and can be used
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
831 to turn it off <emphasis>only</emphasis> if the directory is empty.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
832 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
833 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
834 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
835
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
836 <section id="sec3.9">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
837 <title>Reading and Writing From Files</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
838 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
839 A single file type and format is used for all mass storage files.
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
840 Files store an ordered sequence of 8-bit bytes. NitrOS-9 is not usually
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
841 sensitive to the contents of files for most functions. A given file
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
842 may store a machine language program, characters of text, or almost
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
843 anything else. Data is written to and read from files exactly as
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
844 given. The file can be any size from zero up to the maximum
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
845 capacity of the storage device, and can be expanded or shortened as
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
846 desired.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
847 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
848 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
849 When a file is created or opened a &quot;file pointer&quot; is established
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
850 for it. Bytes within the file are addressed like memory, and the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
851 file pointer holds the &quot;address&quot; of the next byte in the file to be
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
852 written to or read from. The NitrOS-9 &quot;read&quot; and &quot;write&quot; service
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
853 functions always update the pointer as data transfers are performed.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
854 Therefore, successive read or write operations will perform sequential data transfers.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
855 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
856 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
857 Any part of a file can also be read or written in non-sequential
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
858 order by using a function called &quot;seek&quot; to reposition the file
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
859 pointer to any byte address in the file. This is used when random
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
860 access of the data is desired.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
861 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
862 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
863 To expand a file, you can simply write past the previous end of
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
864 the file. Reading up to the last byte of a file will cause the next
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
865 &quot;read&quot; request to return an end-of-file status.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
866 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
867
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
868 <section id="sec3.9.1">
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
869 <title>File Usage in NitrOS-9</title>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
870 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
871 Even though there is physically only one type of file, the logical
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
872 usage of files in NitrOS-9 covers a broad spectrum. Because all
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
873 NitrOS-9 files have the same physical type, commands such as <command>copy</command>,
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
874 <command>del</command>, etc., can be used with any file regardless of its logical
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
875 usage. Similarly, a particular file can be treated as having a
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
876 different logical usage at different times by different programs. The
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
877 main usage of files covered in this section are:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
878 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
879 <simplelist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
880 <member>TEXT</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
881 <member>RANDOM ACCESS DATA</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
882 <member>EXECUTABLE PROGRAM MODULES</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
883 <member>DIRECTORIES</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
884 <member>MISCELLANEOUS</member>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
885 </simplelist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
886 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
887
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
888 <section id="sec3.9.2">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
889 <title>Text Files</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
890 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
891 These files contain variable-length sequences (&quot;lines&quot;) of ASCII
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
892 characters. Each line is terminated by a carriage return character.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
893 Text files are used for program source code, procedure files,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
894 messages, documentation, etc. The Text Editor operates on this file
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
895 format.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
896 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
897 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
898 Text files are usually read sequentially, and are supported by
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
899 almost all high-level languages (such as BASIC09 READ and WRITE
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
900 statements). Even though is is possible to randomly access data at
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
901 any location within a text file, it is rarely done in practice
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
902 because each line is variable length and it is hard to locate the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
903 beginning of each line without actually reading the data to locate
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
904 carriage return characters.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
905 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
906 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
907 The content of text files may be examined using the <command>list</command>
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
908 command.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
909 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
910 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
911
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
912 <section id="sec3.9.3">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
913 <title>Random Access Data Files</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
914 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
915 Random-access data files are created and used primarily from
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
916 within high-level languages such as Basic09, Pascal, C, and Cobol.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
917 In Basic09 and Pascal, &quot;GET&quot;, &quot;PUT&quot;, and &quot;SEEK&quot; functions operate on
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
918 random-access files.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
919 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
920 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
921 The file is organized as an ordered sequence of &quot;records&quot;. Each
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
922 record has exactly the same length, so given a record's numerical
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
923 index, the record's beginning address within the file can be
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
924 computed by multiplying the record number by the number of bytes
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
925 used for each record. Thus, records can be directly accessed in any
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
926 order.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
927 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
928 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
929 In most cases, the high-level language allows each record to be
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
930 subdivided into &quot;fields&quot;. Each field generally has a fixed length
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
931 and usage for all records within the file. For example, the first
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
932 field of a record may be defined as being 25 text characters, the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
933 next field may be two bytes long and used to hold 16-bit binary
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
934 numbers, etc.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
935 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
936 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
937 It is important to understand that NitrOS-9 itself does not directly
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
938 process or deal with records other than providing the basic file
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
939 functions required by all high-level languages to create and use
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
940 random-access files.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
941 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
942 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
943
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
944 <section id="sec3.9.4">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
945 <title>Executable Program Module Files</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
946 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
947 These files are used to hold program modules generated by the
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
948 assembler or <emphasis>compiled</emphasis> by high-level languages.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
949 Each file may
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
950 contain <emphasis>one or more</emphasis> program modules.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
951 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
952 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
953 NitrOS-9 program modules resident in memory have a standard module
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
954 format that, besides the object code, includes a &quot;module header&quot; and
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
955 a CRC check value. Program module(s) stored in files contain exact
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
956 binary copies of the programs as they will exist in memory, and not
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
957 one byte more. NitrOS-9 does not require a &quot;load record&quot;
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
958 system commonly used by other operating systems because NitrOS-9
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
959 programs are position-independent code and therefore do not have to
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
960 be loaded into specific memory addresses.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
961 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
962 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
963 In order for NitrOS-9 to load the program module(s) from a file, the
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
964 file itself must have execute permission and each module
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
965 must have a valid module header and CRC check value. If a program
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
966 module has been altered in any way, either as a file or in memory,
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
967 its CRC check value will be incorrect And NitrOS-9 will refuse to load
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
968 the module. The <command>verify</command> command can be used to check the correctness
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
969 of the check values, and update them to corrected values if
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
970 necessary.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
971 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
972 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
973 On Level One systems, if a file has two or more modules, they are
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
974 treated as independent entities after loading and reside at different memory regions.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
975 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
976 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
977 Like other files that contain &quot;binary&quot; data, attempts to &quot;list&quot;
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
978 program files will result in the display of random characters on the
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
979 terminal giving strange effects. The <command>dump</command> command can be used to
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
980 safely examine the contents of this kind of file in hexadecimal and
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
981 controlled ASCII format.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
982 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
983 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
984
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
985 <section id="sec3.9.5">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
986 <title>Directory Files</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
987 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
988 Directory files play a key role in the NitrOS-9 file system. They can only be created by the <command>makdir</command> command, and
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
989 can be identified by the &quot;d&quot; attribute being set (see <xref linkend="sec3.8.1"/>). The
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
990 file is organized into 32-byte records. Each record can be a
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
991 directory entry. The first 29 bytes of the record is a string of
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
992 characters which is the file name. The last character of the name
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
993 has its sign bit (most significant bit) set. If the record is not
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
994 in use the first character position will have the value zero. The
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
995 last three bytes of the record is a 24-bit binary number which is
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
996 the logical sector number where the file header record (see <xref linkend="sec3.10"/>) is
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
997 located.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
998 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
999 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
1000 The <command>makdir</command> command initializes all records in a new directory
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1001 to be unused entries except for the first two entries. These
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
1002 entries have the names <filename class="directory">.</filename> and <filename class="directory">..</filename> along with the logical sector
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
1003 numbers of the directory and its parent directory, respectively (see <xref linkend="sec3.7.3"/>).
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1004 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1005 <para>
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
1006 Directories cannot be copied or listed - the <command>dir</command> command is
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
1007 used instead. Directories also cannot be deleted directly (see <xref linkend="sec3.5"/>).
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1008 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1009 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1010
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
1011 <section id="sec3.9.6">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1012 <title>Miscellaneous File Usage</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1013 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1014 NitrOS-9's basic file functions are so versatile it is possible to
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1015 devise an almost unlimited number of special-purpose file formats
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1016 for particular applications, which do not fit into any of the three
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1017 previously discussed categories.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1018 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1019 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1020 Examples of this category are COBOL Indexed Sequential (ISAM)
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1021 files and some special word processor file formats which allow
1011
cc153d1671f7 Updated for new manuals
boisy
parents: 644
diff changeset
1022 random access of text lines. As discussed in Sec.
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1023 3.9.1, most NitrOS-9 utility commands work with any file format including
1053
b5ff125a1d60 Since this book was only typeset in fixed width, single-font, they used
roug
parents: 1017
diff changeset
1024 these special types. In general, the <command>dump</command> command is the preferred
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1025 method for examining the contents of unusually formatted files.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1026 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1027 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1028 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1029
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
1030 <section id="sec3.10">
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1031 <title>Physical File Organization</title>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1032 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1033 NitrOS-9's file system implements a universal logical organization
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1034 for all I/O devices that effectively eliminates most hardware-related
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1035 considerations for most applications. This section gives
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1036 basic information about the physical file structure used by NitrOS-9.
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1037 For more information, see the NitrOS-9 System Programmer's Manual.
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1038 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1039 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1040 Each NitrOS-9 file is comprised of one or more sectors which are
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1041 the physical storage units of the disk systems. Each sector holds
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1042 exactly 256 data bytes, and disk is numbered sequentially starting
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1043 with sector zero, track zero. This number is called a &quot;logical
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1044 sector number&quot;, or <emphasis>LSN</emphasis>.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1045 The mapping of logical sector numbers to
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1046 physical track/sector numbers is done by the disk driver module.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1047 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1048 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1049 Sectors are the smallest allocatable physical unit on a disk
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1050 system, however, to increase efficiency on some larger-capacity disk.
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1051 systems, NitrOS-9 uses uniform-sized groups of sectors, called
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1052 <emphasis>clusters</emphasis>,
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1053 as the smallest allocatable unit. Cluster sizes are always an
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1054 integral power of two (2, 4, 8, etc.). One sector of each disk is
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1055 used as a <emphasis>bitmap</emphasis> (usually LSN 1),
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1056 in which each data bit corresponds
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1057 to one cluster on the disk. The bits are set and cleared to
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1058 indicate which clusters are in use (or defective), and which are
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1059 free for allocation to files.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1060 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1061 <para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1062 The Color Computer disk system uses the following format:
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1063 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1064 <itemizedlist mark="square">
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1065 <listitem><para>
1500
b00cf13c9f61 Major changes for new NitrOS-9 manual
boisy
parents: 1093
diff changeset
1066 double density recording on two sides
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1067 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1068 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1069 40 tracks per disk
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1070 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1071 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1072 18 sectors per track
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1073 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1074 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1075 one sector per cluster
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1076 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1077 </itemizedlist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1078 <para>
1093
4dae346c4969 Added crossreferences and lowercased synopsises
roug
parents: 1053
diff changeset
1079 Each file has a directory entry (see <xref linkend="sec3.9.5"/>) which includes the
144
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1080 file name and the logical sector number of the file's &quot;file descriptor
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1081 sector&quot;, which contains a complete description of the file
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1082 including:
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1083 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1084 <itemizedlist mark="square">
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1085 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1086 attributes
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1087 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1088 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1089 owner
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1090 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1091 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1092 date and time created
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1093 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1094 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1095 size
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1096 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1097 <listitem><para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1098 segment list (description of data sector blocks)
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1099 </para></listitem>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1100 </itemizedlist>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1101 <para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1102 Unless the file size is zero, the file will have one or more
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1103 sectors/clusters used to store data. The data sectors are grouped
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1104 into one or more contiguous blocks called &quot;segments&quot;.
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1105 </para>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1106 </section>
f4e798ea65b9 More splitups.
roug
parents:
diff changeset
1107 </chapter>