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=utf-8"> 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. ("\" cannot be used.)</P> 17 18<p><i><CODE>darch.exe</CODE> also exists as <CODE>darchD.exe</CODE> in this program. There is no difference in how the two behave. Normally you should use <CODE>darch.exe</CODE>. <CODE>darchD.exe</CODE> remains in order to maintain compatibility with past systems.</i></p> 19 20<H3>Create Mode</H3> 21<dl><dd><pre class="construction"> 22darch -c file/directory list... arcname 23</pre></dd></dl> 24<TABLE class="api_list" border="1" > 25 <TBODY> 26 <TR> 27<TH>-c</TH> 28<TD>Specifies the files or directory to be archived.</TD> 29 </TR> 30 <TR> 31<TH>arcname</TH> 32<TD>Archive file name.</TD> 33 </TR> 34 </TBODY> 35</TABLE> 36<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> 37 38<dl><dd><pre class="construction"> 39Example: 40$ pwd 41/RVL_SDK/dvddata 42$ darch -c constitu constitu.arc 43$ darch -l constitu.arc 44constitu/article1/section1 45constitu/article1/section2 46constitu/article1/section3 47...... 48$ 49</pre></dd></dl> 50 51<H3>Extract Mode</H3> 52<dl><dd><pre class="construction"> 53darch -x directory arcname 54</pre></dd></dl> 55<TABLE class="api_list" border="1" > 56 <TBODY> 57 <TR> 58<TH>-x</TH> 59<TD>Specifies the directory in which to place extracted files.</TD> 60 </TR> 61 <TR> 62<TH>arcname</TH> 63<TD>Archive file name.</TD> 64 </TR> 65 </TBODY> 66</TABLE> 67 68<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> 69<dl><dd><pre class="construction"> 70Example: 71$ ls tmp 72ls:tmp:No such file or directory 73$ darch -x tmp constitu.arc 74 Position Length name 75----------------------- 76d 0 0 constitu/ 77d 0 0 constitu/article1/ 78- 512 209 constitu/article1/section1 79...... 80$ ls tmp 81constitu/ 82$ 83</pre></dd></dl> 84 85<H3>Diff Mode</H3> 86<dl><dd><pre class="construction"> 87darch -d directory arcname 88</pre></dd></dl> 89<TABLE class="api_list" border="1" > 90 <TBODY> 91 <TR> 92<TH><code>-d</code></TH> 93<TD>Specifies a work directory.</TD> 94 </TR> 95 <TR> 96<TH>arcname</TH> 97<TD>Archive file name.</TD> 98 </TR> 99 </TBODY> 100</TABLE> 101 102<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> 103<dl><dd><pre class="construction"> 104Example: 105$ pwd 106/RVL_SDK/dvddata 107$ darch -d . constitu.arc 108constitu/ 109constitu/article1/ 110constitu/article1/section1 111...... 112$ 113</pre></dd></dl> 114 115<H3>List Mode</H3> 116<dl><dd><pre class="construction"> 117darch -l arcname 118</pre></dd></dl> 119<TABLE class="api_list" border="1" > 120 <TBODY> 121 <TR> 122<TH><code>-l</code></TH> 123<TD>Lists the files included in the archive in the order they appear in the file.</TD> 124 </TR> 125 <TR> 126<TH>arcname</TH> 127<TD>Archive file name.</TD> 128 </TR> 129 </TBODY> 130</TABLE> 131 132<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> 133<dl><dd><pre class="construction"> 134Example: 135$ darch -l constitu.arc 136constitu/article1/section1 137constitu/article1/section2 138constitu/article1/section3 139...... 140$ darch -lv constitu.arc 141File start offset:0x00000200 142 143 Position Length name 144-------------------------------------- 145 0x00000200 0x000000d1 constitu/article1/section1 146 0x000002e0 0x0000075b constitu/article1/section2 147 0x00000a40 0x00000826 constitu/article1/section3 148...... 149$ 150</pre></dd></dl> 151 152<H3>List Mode 2</H3> 153<dl><dd><pre class="construction"> 154darch -t arcname 155</pre></dd></dl> 156<TABLE class="api_list" border="1" > 157 <TBODY> 158 <TR> 159<TH>-t</TH> 160<TD>Lists files included in the archive in a format similar to tar.</TD> 161 </TR> 162 <TR> 163<TD>arcname</TD> 164<TD>Archive file name.</TD> 165 </TR> 166 </TBODY> 167</TABLE> 168 169<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> 170<dl><dd><pre class="construction"> 171Example: 172$ darch -t constitu.arc 173constitu/ 174constitu/article1/ 175constitu/article1/section1 176...... 177$ darch -tv constitu.arc 178 Position Length name 179----------------------- 180d 0 0 constitu/ 181d 0 0 constitu/article1/ 182- 512 209 constitu/article1/section1 183...... 184</pre></dd></dl> 185 186<H3>Delete Mode</H3> 187<dl><dd><pre class="construction"> 188darch -e file/directory list arcname 189</pre></dd></dl> 190<TABLE class="api_list" border="1" > 191 <TBODY> 192 <TR> 193<TH>-e</TH> 194<TD>Specifies the files/directories to be deleted from the archive.</TD> 195 </TR> 196 <TR> 197<TH>arcname</TH> 198<TD>Archive file name.</TD> 199 </TR> 200 </TBODY> 201</TABLE> 202 203<P>Use this mode to delete specified files/directories from the archive.</P> 204<dl><dd><pre class="construction"> 205Example: 206$ darch -l constitu.arc 207constitu/article1/section1 208constitu/article1/section2 209constitu/article1/section3 210...... 211$ darch -e constitu/article1/section1 constitu.arc 212$ darch -l constitu.arc 213constitu/article1/section2 214constitu/article1/section3 215...... 216$ 217</pre></dd></dl> 218 219<H3>Other Options</H3> 220<TABLE class="api_list" border="1" > 221 <TBODY> 222 <TR> 223<TH>-v</TH> 224<TD>Turns verbose mode ON.</TD> 225 </TR> 226 <TR> 227<TH><code>-h</code></TH> 228<TD>Displays a help message.</TD> 229 </TR> 230 </TBODY> 231</TABLE> 232 233<H2>Tips</H2> 234<P>The order of files/directories can be specified as shown below.</P> 235<dl><dd><pre class="construction"> 236$ less filelist 237constitu/article3/section3 238constitu/article2/section2 239constitu/article2/section4 240constitu/article1/section1 241constitu/article2/section1 242constitu/article1/section2 243constitu/article1/section3 244constitu/article1/section4 245constitu/article3/section2 246constitu/article2/section3 247constitu/article1/section5 248constitu/article1/section7 249constitu/article1/section8 250constitu/article3/section1 251constitu/article1/section9 252constitu/article1/section6 253constitu/article1/sectionA 254$ darch -c `less filelist` constitu.arc 255$ 256</pre></dd></dl> 257 258<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> 259<dl><dd><pre class="construction"> 260$ find directory -type f -name "*" 261</pre></dd></dl> 262 263<P>Use the <CODE>-l</CODE> option to list files already in the archive in the format described above.</P> 264<dl><dd><pre class="construction"> 265$ darch -l arcname 266</pre></dd></dl> 267 268<H2>Revision History</H2> 269<P> 2702009/06/05 Explained the existence of <CODE>*.exe</CODE> and <CODE>*D.exe</CODE>.<br>2009/01/15 Changed <CODE>darchD</CODE> to <CODE>darch</CODE>.<BR>2006/05/15 Initial version. 271</P> 272 273<hr><p>CONFIDENTIAL</p></body> 274</HTML> 275