1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<TITLE>darch</TITLE>
7<LINK rel="stylesheet" href="../CSS/revolution.css">
8</HEAD>
9<BODY>
10<H1>darch</H1>
11
12<H2>Overview</H2>
13<P>This utility archives several files into one file.</P>
14
15<H2>Using the Library</H2>
16<P>This tool includes several major modes. Be sure to use only forward slashes when writing path names below. (&quot;\&quot; cannot be used.)</P>
17
18<H3>Create Mode</H3>
19<dl><dd><pre class="construction">
20darchD -c file/directory list... arcname
21</pre></dd></dl>
22<TABLE class="api_list" border="1" >
23  <TBODY>
24    <TR>
25      <TH>-c</TH>
26<TD>Specifies the files or directory to be archived.</TD>
27    </TR>
28    <TR>
29      <TH>arcname</TH>
30<TD>Archive file name.</TD>
31    </TR>
32  </TBODY>
33</TABLE>
34<P>Use this mode when creating an archive. If a directory name is specified, all files within the directory will be placed in the archive. <STRONG>Note:</STRONG> Files and directories are archived in the order specified by this command.</P>
35
36<dl><dd><pre class="construction">
37Example:
38$ pwd
39/RVL_SDK/dvddata
40$ darchD -c constitu constitu.arc
41$ darchD -l constitu.arc
42constitu/article1/section1
43constitu/article1/section2
44constitu/article1/section3
45......
46$
47</pre></dd></dl>
48
49<H3>Extract Mode</H3>
50<dl><dd><pre class="construction">
51darchD -x directory arcname
52</pre></dd></dl>
53<TABLE class="api_list" border="1" >
54  <TBODY>
55    <TR>
56      <TH>-x</TH>
57<TD>Specifies the directory in which to place extracted files.</TD>
58    </TR>
59    <TR>
60      <TH>arcname</TH>
61<TD>Archive file name.</TD>
62    </TR>
63  </TBODY>
64</TABLE>
65
66<P>Use this mode when extracting from an archive. A directory that does not exist must be specified as the directory to use for extraction.</P>
67<dl><dd><pre class="construction">
68Example:
69$ ls tmp
70ls: tmp: No such file or directory
71$ darchD -x tmp constitu.arc
72  Position Length  name
73-----------------------
74d       0       0 constitu/
75d       0       0 constitu/article1/
76-     512     209 constitu/article1/section1
77......
78$ ls tmp
79constitu/
80$
81</pre></dd></dl>
82
83<H3>Diff Mode</H3>
84<dl><dd><pre class="construction">
85darchD -d directory arcname
86</pre></dd></dl>
87<TABLE class="api_list" border="1" >
88  <TBODY>
89    <TR>
90<TH><code>-d</code></TH>
91<TD>Specifies a work directory.</TD>
92    </TR>
93    <TR>
94      <TH>arcname</TH>
95<TD>Archive file name.</TD>
96    </TR>
97  </TBODY>
98</TABLE>
99
100<P>Be sure to use this mode when comparing the contents of an archive with actual files. Move to the specified work directory and compare whether each file in the archive matches files located in the work directory.</P>
101<dl><dd><pre class="construction">
102Example:
103$ pwd
104/RVL_SDK/dvddata
105$ darchD -d . constitu.arc
106constitu/
107constitu/article1/
108constitu/article1/section1
109......
110$
111</pre></dd></dl>
112
113<H3>List Mode</H3>
114<dl><dd><pre class="construction">
115darchD -l arcname
116</pre></dd></dl>
117<TABLE class="api_list" border="1" >
118  <TBODY>
119    <TR>
120<TH><code>-l</code></TH>
121<TD>Lists the files included in the archive in the order they appear in the file.</TD>
122    </TR>
123    <TR>
124      <TH>arcname</TH>
125<TD>Archive file name.</TD>
126    </TR>
127  </TBODY>
128</TABLE>
129
130<P>Use this mode to view the contents of an archive. When used with the <CODE>-v</CODE> option, you can view offset and length for each file.</P>
131<dl><dd><pre class="construction">
132Example:
133$ darchD -l constitu.arc
134constitu/article1/section1
135constitu/article1/section2
136constitu/article1/section3
137......
138$ darchD -lv constitu.arc
139File start offset: 0x00000200
140
141  Position   Length     name
142--------------------------------------
143  0x00000200 0x000000d1 constitu/article1/section1
144  0x000002e0 0x0000075b constitu/article1/section2
145  0x00000a40 0x00000826 constitu/article1/section3
146......
147$
148</pre></dd></dl>
149
150<H3>List Mode 2</H3>
151<dl><dd><pre class="construction">
152darchD -t arcname
153</pre></dd></dl>
154<TABLE class="api_list" border="1" >
155  <TBODY>
156    <TR>
157      <TH>-t</TH>
158<TD>Lists files included in the archive in a format similar to tar.</TD>
159    </TR>
160    <TR>
161      <TD>arcname</TD>
162<TD>Archive file name.</TD>
163    </TR>
164  </TBODY>
165</TABLE>
166
167<P>Use this mode to list the contents of the archive in a format similar to tar (that is, the full path of each file name is displayed). <STRONG>Note:</STRONG> The order in which files are displayed does not necessarily match the order of files in the archive.</P>
168<dl><dd><pre class="construction">
169Example:
170$ darchD -t constitu.arc
171constitu/
172constitu/article1/
173constitu/article1/section1
174......
175$ darchD -tv constitu.arc
176  Position Length  name
177-----------------------
178d       0       0 constitu/
179d       0       0 constitu/article1/
180-     512     209 constitu/article1/section1
181......
182</pre></dd></dl>
183
184<H3>Delete Mode</H3>
185<dl><dd><pre class="construction">
186darchD -e file/directory list arcname
187</pre></dd></dl>
188<TABLE class="api_list" border="1" >
189  <TBODY>
190    <TR>
191      <TH>-e</TH>
192<TD>Specifies the files/directories to be deleted from the archive.</TD>
193    </TR>
194    <TR>
195<TH>arcname</TH>
196<TD>Archive file name.</TD>
197    </TR>
198  </TBODY>
199</TABLE>
200
201<P>Use this mode to delete specified files/directories from the archive.</P>
202<dl><dd><pre class="construction">
203Example:
204$ darchD -l constitu.arc
205constitu/article1/section1
206constitu/article1/section2
207constitu/article1/section3
208......
209$ darchD -e constitu/article1/section1 constitu.arc
210$ darchD -l constitu.arc
211constitu/article1/section2
212constitu/article1/section3
213......
214$
215</pre></dd></dl>
216
217<H3>Other Options</H3>
218<TABLE class="api_list" border="1" >
219  <TBODY>
220    <TR>
221      <TH>-v</TH>
222<TD>Turns verbose mode ON.</TD>
223    </TR>
224    <TR>
225<TH><code>-h</code></TH>
226<TD>Displays a help message.</TD>
227    </TR>
228  </TBODY>
229</TABLE>
230
231<H2>Tips</H2>
232<P>The order of files/directories can be specified as shown below.</P>
233<dl><dd><pre class="construction">
234$ less filelist
235constitu/article3/section3
236constitu/article2/section2
237constitu/article2/section4
238constitu/article1/section1
239constitu/article2/section1
240constitu/article1/section2
241constitu/article1/section3
242constitu/article1/section4
243constitu/article3/section2
244constitu/article2/section3
245constitu/article1/section5
246constitu/article1/section7
247constitu/article1/section8
248constitu/article3/section1
249constitu/article1/section9
250constitu/article1/section6
251constitu/article1/sectionA
252$ darchD -c `less filelist` constitu.arc
253$
254</pre></dd></dl>
255
256<P>The order of files can be easily changed by editing this file. Use the following command to list all files within a directory in the above described format.</P>
257<dl><dd><pre class="construction">
258$ find directory -type f -name &quot;*&quot;
259</pre></dd></dl>
260
261<P>Use the <CODE>-l</CODE> option to list files already in the archive in the format described above.</P>
262<dl><dd><pre class="construction">
263$ darchD -l arcname
264</pre></dd></dl>
265
266<H2>Revision History</H2>
267<P>
2682006/05/15 Initial version.<br>
269</P>
270
271<hr><p>CONFIDENTIAL</p></body>
272</HTML>
273