darch

Overview

This utility archives several files into one file.

How to Use

This tool includes several major modes. Be sure to use only forward slashes when writing path names below. ("\" cannot be used.)

Create Mode

darchD -c file/directory list... arcname

-c Specifies the files/directory to be archived.
arcname Archive file name

Use this mode when creating an archive. If a directory name is specified, all files within the directory will be placed in the archive.

Note: Files and directories are archived in the order specified by this command.

Example:
$ pwd
/RVL_SDK/dvddata
$ darchD -c constitu constitu.arc
$ darchD -l constitu.arc
constitu/article1/section1
constitu/article1/section2
constitu/article1/section3
......
$

Extract Mode

darchD -x directory arcname

-x Specifies the directory in which to place extracted files.
arcname Archive file name

Use this mode when extracting from an archive. A directory that does not exist must be specified as the directory to use for extraction.

Example:
$ ls tmp
ls: tmp: No such file or directory
$ darchD -x tmp constitu.arc
  Position Length  name
-----------------------
d       0       0 constitu/
d       0       0 constitu/article1/
-     512     209 constitu/article1/section1
......
$ ls tmp
constitu/
$

Diff Mode

darchD -d directory arcname

-d Specifies a work directory.
arcname Archive file name

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.

Example:
$ pwd
/RVL_SDK/dvddata
$ darchD -d . constitu.arc
constitu/
constitu/article1/
constitu/article1/section1
......
$

List Mode

darchD -l arcname

-l Lists the files included in the archive in the order they appear in the file.
arcname Archive file name

Use this mode to view the contents of an archive. When used with the -v option, you can view offset and length for each file.

Example:
$ darchD -l constitu.arc
constitu/article1/section1
constitu/article1/section2
constitu/article1/section3
......
$ darchD -lv constitu.arc
File start offset: 0x00000200

  Position   Length     name
--------------------------------------
  0x00000200 0x000000d1 constitu/article1/section1
  0x000002e0 0x0000075b constitu/article1/section2
  0x00000a40 0x00000826 constitu/article1/section3
......
$

List Mode 2

darchD -t arcname

-t Lists files included in the archive in a format similar to tar.
arcname Archive file name

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).

Note: The order in which files are displayed does not necessarily match the order of files in the archive.

Example:
$ darchD -t constitu.arc
constitu/
constitu/article1/
constitu/article1/section1
......
$ darchD -tv constitu.arc
  Position Length  name
-----------------------
d       0       0 constitu/
d       0       0 constitu/article1/
-     512     209 constitu/article1/section1
......

Delete Mode

darchD -e file/directory list arcname

-e Specifies the files/directories to be deleted from the archive.
arcname Archive file name

Use this mode to delete specified files/directories from the archive.

Example:
$ darchD -l constitu.arc
constitu/article1/section1
constitu/article1/section2
constitu/article1/section3
......
$ darchD -e constitu/article1/section1 constitu.arc
$ darchD -l constitu.arc
constitu/article1/section2
constitu/article1/section3
......
$

Other Options

-v Turns verbose mode ON.
-h Displays a help message.

Tips

The order of files/directories can be specified as shown below.

$ less filelist
constitu/article3/section3
constitu/article2/section2
constitu/article2/section4
constitu/article1/section1
constitu/article2/section1
constitu/article1/section2
constitu/article1/section3
constitu/article1/section4
constitu/article3/section2
constitu/article2/section3
constitu/article1/section5
constitu/article1/section7
constitu/article1/section8
constitu/article3/section1
constitu/article1/section9
constitu/article1/section6
constitu/article1/sectionA
$ darchD -c `less filelist` constitu.arc
$

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 format described above.


$ find directory -type f -name "*"

Use the -l option to list files already in the archive in the format described above.


$ darchD -l arcname

Revision History

2006/05/15 Initial version.


CONFIDENTIAL