メインコンテンツまでスキップ

5. ARCHIE

5.1. ARCHIE とは​

archie は情報システムである。国際 TCP/IP ネットワーク (Internet) の中で情報を探すための電子的なディレクトリサービスを提供する。archie の最もよく知られた用途は、世界中の 1000 を超える匿名 FTP サイトの内容データベースをスキャンすることである。現在、このデータベースには匿名 FTP サイトから 2,100,000 を超えるファイル名が収録されている。このデータベースは archie データベースとして知られる。匿名 FTP サイトで公開されているファイルには、さまざまなシステム(Windows、MS-DOS、Macintosh、Unix など)向けのソフトウェアパッケージ、ユーティリティ、情報やドキュメントのファイル、メーリングリストや Usenet グループの議論のアーカイブなどがある。大半の FTP サイトでは、リソースがディレクトリとサブディレクトリの階層に編成されている。このデータベースはディレクトリのパスとファイル名の両方を追跡している。archie データベースは自動的に更新されるため、情報の正確性が保たれる。このデータベースを使えば、複数のマシンにログインすることなく、必要なファイルの場所を容易に見つけられる。

5.2. 誰が ARCHIE を使えるか​

どのネットワークのユーザーでも、電子メールで archie データベースにアクセスできる。Internet 上のユーザーは、他のアクセス手段も利用できる(詳細は後述の Using ARCHIE 節を参照)。archie サーバーに情報を要求する際には、次の基本的なルールを守ってほしい。* 勤務時間中は接続を避ける。多くの archie サーバーは専用機ではなく、ローカルでの役割も持っている。* 問い合わせはできるだけ具体的にする。応答が速く短くなる。* 自分のコンピュータにインストールされたユーザーインターフェースを使えば、サーバーサイトの負荷を減らせるので、ぜひ使ってほしい。* 自分に最も近い archie サーバーを使い、特に大西洋横断回線に負荷をかけないこと。

5.3. ARCHIE への接続方法​

archie データベースは次の場所で保守されている:

+---------------------------------------------------------------+
| |
| Host Country |
| |
+---------------------------------------------------------------+
| archie.au Australia |
| archie.edvz.uni-linz.ac.at Austria |
| archie.univie.ac.at Austria |
| archie.uqam.ca Canada |
| archie.funet.fi Finland |
| archie.th-darmstadt.de Germany |
| archie.doc.ic.ac.uk Great-Britain |
| archie.ac.il Israel |
| archie.unipi.it Italy |
| archie.wide.ad.jp Japan |
| archie.kyoto-u.ac.jp Japan |
| archie.hana.nm.kr Korea |
| archie.sogang.ac.kr Korea |
| archie.nz New Zealand |
| archie.rediris.es Spain |
| archie.luth.se Sweden |
| archie.switch.ch Switzerland |
| archie.ncu.edu.tw Taiwan |
| archie.ans.net USA |
| archie.internic.net USA |
| archie.rutgers.edu USA |
| archie.sura.net USA |
| archie.unl.edu USA |
| |
+---------------------------------------------------------------+

archie データベースへのアクセス方法は 3 つある。ローカルクライアント、対話的な Telnet セッション、電子メールである。それぞれのアクセス方法については、後述の Using ARCHIE 節で説明する。

5.4. ARCHIE の使い方​

引数の形式はこの節の末尾に示す。山括弧 (<>) は省略可能な引数を、縦棒 (|) は引数の選択を示す。注: archie サーバーの新しいバージョン (3.0) が利用可能になった。対話アクセスや電子メール用インターフェースのコマンドのうち、一部が以前のバージョン (2.11 以前) と若干異なる。(+) が付いたコマンド形式はバージョン 3.0 のみで有効であり、(*) が付いたものは以前のバージョンでのみ使用できる。使用しようとするサーバーにどのバージョンがインストールされているかを調べるには、version コマンドを実行するとよい。

5.4.1. ローカルクライアントの使用:​

これらのクライアントは、archie サーバーへの迅速かつ容易な非対話アクセスを提供し、サーバーの性能とユーザーの応答時間を向上させるので、使用が推奨される。archie サーバーにアクセスするためのパブリックドメインのクライアントは、Macintosh、MS-DOS、OS/2、VMS、NeXT、Unix、X-Windows 向けに入手できる。クライアントは archie サイトのディレクトリ /pub/archie/clients または /archie/clients から匿名 FTP で入手可能である。これらのすべてのプラットフォームが単純なコマンドラインクライアントをサポートしている。さらに、X-Windows 向けにグラフィカルインターフェース (xarchie と呼ばれる) も入手できる。

5.4.1.1. Archie クライアントのコマンドとパラメータ​

グラフィカルインターフェースを使う場合、マウスボタンを押して archie の機能にアクセスする。結果は、さらなる探索のために選択可能なフィールド付きで表示される。基本的な archie クライアントは、自分のマシン上で入力する、引数を伴うコマンドである。archie クライアントの多くのバージョンでは、引数なしで archie と入力すると、使用可能な引数の一覧とそれぞれの簡単な説明が表示される。コマンドの形式は次のとおりである:

+---------------------------------------------------------------+
| |
| archie <-options> string | pattern |
| |
+---------------------------------------------------------------+

オプションは次のとおりである: o 結果を保存する出力ファイル名を指定する(すべてのクライアントで使えるわけではない)。 l 結果を 1 行に 1 件ずつ一覧表示する。プログラムによる解析に適した形式である。 t 結果を日付の逆順に並べ替える。 m# 返す一致の最大数を指定する(# は 0 から 1000 の範囲)。デフォルト値は 95。 h archie-server 問い合わせを送る先の archie サーバーを指定する。この引数がなければ、デフォルトの archie サーバーが定義されていればそこに問い合わせが送られる。 L 既知のサーバーと現在のデフォルトサーバーを一覧表示する。次のオプションのグループは、データベースに対して行う検索の種類を決定する。これらは互いに排他である。 s file/directory 名に string が含まれていれば一致となる。検索では大文字と小文字は区別されない。 c 上記と同じだが、検索で大文字と小文字が区別される。 e string はデータベース内の file/directory 名と(大文字小文字を含めて)完全に一致しなければならない。これがデフォルトの検索方法である。 r pattern を使ってデータベースを検索する。pattern には検索の前に解釈されるべき特殊文字が含まれている。プラットフォームやクライアントによって、利用できるオプションに若干の差があるかもしれない。結果は、引数に一致するファイルやディレクトリを持つ FTP サイトのアドレス、ファイルのサイズ、最終更新日、ディレクトリの一覧である。デフォルトでは、一覧はホストアドレス順に並べられる。archie の出力例については、後述の Examples 節を参照のこと。

5.4.2. Telnet の使用:​

archie サーバーに対話的にアクセスするには、既存のサーバーの 1 つに telnet する(前述の How to get to ARCHIE 節のサーバー一覧を参照)。login: プロンプトで archie と入力すると、ログイン処理が終わり、ユーザーは archie> プロンプトに残る。サーバーはユーザーの要求を受け付ける準備ができている。次のコマンドが利用できる: exit, quit, bye archie を終了する。 help オンラインヘルプを呼び出す。commandname を付けて実行すると、ヘルプ要求は指定された話題に限定される。RETURN キーを押すとオンラインヘルプから出る。 list データベース内のサイトとその最終更新時刻の一覧を提供する。省略可能な引数は、pattern に一致するサイトに一覧を限定する。結果は、サイト名、サイトの IP アドレス、データベース内の最終更新日の一覧である。pattern なしで list コマンドを実行すると、データベース内のすべてのサイトが一覧表示される(1000 を超えるサイト!)。例えば list .de$ とすると、ドイツのすべてのサイトが一覧表示される。 site(*) site-name データベース内の site-name のディレクトリと、そのサブディレクトリを再帰的に一覧表示する。結果が非常に長くなる場合がある。 whatis string ソフトウェアパッケージの説明のデータベースから string を検索する。検索では大文字と小文字は区別されない。

prog  string  |  pattern
find(+) string | pattern
searches the database for string or pattern which represents
the name of the resource to be found in the database. Searches
may be performed in a number of different ways specified in the
variable search (set command) which also decides the
interpretation of the parameter as string or pattern. The
result is a list of FTP site addresses with matching entries,
the size of the resource, its last modification date and the
directory to find it. The number of hits is limited by the
maxhits variable (set command). The result of prog can be
sorted in different ways, depending on the value of the sortby
variable (set command). By default, the variables search,
maxhits and sortby are set to, respectively, exact match search
on string, 1000 hits and unsorted resulting list. Typing the
keyboard interrupt character during a search will abort it. The
results up to that time are displayed. See the Examples section
below for an example of the prog command and its results.

mail <email> <,email2...>
sends the result of the last command in a mail message to the
specified e-mail address(es). If issued with no argument, the
result is sent to the address specified in the variable mailto
(set command).

show 指定された変数名の値を表示する。引数なしで実行すると、すべての変数を表示する。使用可能な変数については、後述の set コマンドを参照のこと。

set  variable  value
sets one of the archie's variables. Values of these variables
affect how archie interacts with the user.

変数と値は次のとおりである: compress(+) compress-method mail コマンドで結果をメールする前に使う圧縮方法(none または compress)を指定する。デフォルトは none。 encode(+) encode-method mail コマンドで結果をメールする前に使う符号化方法(none または uuencode)を指定する。compress が設定されていない場合、この変数は無視される。デフォルトは none。

mailto  email  <,email2 ...>
specifies the e-mail address(es) to mail the result of the last
command when mail is issued with no arguments.

maxhits number prog が生成する一致の最大数を指定する(0 から 1000 の範囲)。デフォルト値は 1000。 search search-value コマンド prog string | pattern がデータベースに対して行う検索の種類を決める。search-value は次のとおり: sub string を使ってデータベースに対して部分一致かつ大文字小文字を区別しない検索を行う。例: "is" は "islington"、"this"、"poison" に一致する。 subcase 上記と同じだが、検索で大文字と小文字が区別される。例: "TeX" は "LaTeX" に一致するが "Latex" には一致しない。 exact prog の引数 (string) がデータベース内の文字列と(大文字小文字を含めて)完全に一致しなければならない。すべての検索方法の中で最も速く、デフォルトでもある。 regex データベースの検索の前に pattern が解釈される。 sortby sort-value prog の結果の並べ替え方法を表す。sort-value は次のとおり: hostname FTP サイトのアドレスを辞書順に並べる。 time 更新日順、新しいものから順に並べる。 size 見つかったファイルやディレクトリのサイズ順、大きいものから順に並べる。 filename ファイル名またはディレクトリ名を辞書順に並べる。 none 並べ替えなし(デフォルト)。ここに述べたものとは逆の並べ替え順は、与えた sortby 値の前に r を付けることで得られる(例: hostname の逆順は rhostname)。

term  terminal-type   <number-of-rows  <number-of-columns>>
tells the archie server what type of terminal you are
using, and optionally its size in rows and columns, e.g.:

set term xterm 24 100

5.4.3. 電子メールの使用:​

電子メールにしか接続手段がないユーザーは、前述の How to get to ARCHIE 節に示されたサーバーのいずれかのドメインアドレス(例: [email protected])にメールを送ることで、archie サーバーにアクセスできる。コマンドはメールの本文部分に書いて送る。archie サーバーの電子メール用インターフェースは、Using Telnet で説明したコマンドの一部を認識する。電子メール用インターフェース特有の便利なコマンドや注意点を以下に説明する。空のメッセージ、あるいは有効な要求を含まないメッセージを受信すると、ヘルプ要求とみなされる。コマンド行は第 1 列 から始まる。有効なコマンドに一致しない行はすべて無視される。Subject: 行は本文の一部として処理される。 help ヘルプファイルを送る。help コマンドは排他的で、同じメッセージ内の他のコマンドは無視される。 path return-address set mailto(+) return-address メッセージヘッダーから抽出されるものとは異なる返信先電子メールアドレスを指定する。数時間以内に archie サーバーから返信がない場合は、要求メールに path コマンドを追加する必要があるかもしれない。

list  pattern  <pattern2 ...>
provides a list of the sites in the database that match pattern
and the time at which they were last updated. The result is a
list with site names, sites IP address and date of the last
update in the database.

site(*) site-name データベース内の site-name のディレクトリと、そのサブディレクトリを再帰的に一覧表示する。

whatis  string  <string2 ...>
searches the database of software packages descriptions for
each string. The search is case insensitive.

prog pattern <pattern2 ...>
find(+) pattern <pattern2>
searches the database for each interpretation of pattern which
represents the name of a resource to be found in the database.
If multiple patterns are placed on one line, in that case, the
results will be mailed back in one message. If multiple prog
lines appear, then multiple messages will be returned, one for
each prog line. Results are sorted by FTP site address in
lexical order. If pattern contains spaces, it must be quoted
with single (') or double (") quotes. The search is case
insensitive.

compress(*) 現在の要求の結果を圧縮して uuencode する。返信を受け取ったら、uudecode を実行するとよい。すると .Z ファイルができる。そのファイルに uncompress を実行すれば、要求の結果が得られる。 set compress(+) compress-method mail コマンドで現在の要求の結果をメールする前に使う圧縮方法(none または compress)を指定する。デフォルトは none。 set encode(+) encode-method mail コマンドで現在の要求の結果をメールする前に使う符号化方法(none または uuencode)を指定する。compress が設定されていない場合、この変数は無視される。デフォルトは none。注: set compress compress と set encode uuencode を実行すると、前述の compress コマンドと同じ結果になる。 quit これ以降の内容は解釈されない。メールの末尾に署名が自動的に付く場合に便利である。 pattern の説明 pattern とは、特別な意味を持つ文字を含む文字列を表す。文字の前に "" を置くと、その特別な意味は失われる。特殊文字は次のとおり: . (ピリオド) 他の任意の 1 文字の代わりとなるワイルドカード文字である。例: "...." は任意の 4 文字の文字列に一致する。 ^ (キャレット) "^" が pattern の先頭にあれば、検索される文字列は "^" の後の部分文字列で始まらなければならない。pattern の他の場所にある場合は特殊文字とはみなされない。例: "^efghi" は "efghi" や "efghijlk" に一致するが、"abcefghi" には一致しない。 $ (ドル記号) "$" が pattern の末尾にあれば、検索される文字列は "$" の前の部分文字列で終わらなければならない。pattern の他の場所にある場合は特殊文字とはみなされない。例: "efghi$" は "efghi" や "abcdefghi" に一致するが、"efghijkl" には一致しない。

5.5. 例​

archie クライアントを使って archie -s eudora というコマンドを入力するか、電子メールまたは Telnet セッションで prog eudora あるいは find eudora というコマンドを送ると、archie は次の結果を送る: Host ftp.ascii.co.jp (133.152.1.1) Last updated 03:38 8 Aug 1993

Location: /pub/MAC
DIRECTORY drwxrwxr-x 2048 bytes 00:00 6 May 1992 eudora

Host ftp.ascii.co.jp (133.152.1.1) Last updated 03:38 8 Aug 1993 Location: /pub/MAC/eudora FILE -r--r--r-- 281139 bytes 00:00 21 Oct 1991 eudora1.2.2.sit.hqx Host ftp.ci.ua.pt (192.80.21.201) Last updated 04:53 9 Aug 1993

Location: /pub/NetNews/comp.binaries.mac
FILE -rw-r--r-- 438 bytes 12:04 10 Jul 1993 Eudora1.3.readme

Host ftp.ci.ua.pt (192.80.21.201) Last updated 04:53 9 Aug 1993

Location: /pub/NetNews/comp.binaries.mac
FILE -rw-r--r-- 278912 bytes 12:04 10 Jul 1993 Eudora1.3.sit.bin

など。list .de$ というコマンドを電子メールまたは Telnet セッションで送ると、次の結果が得られる:

alice.fmi.uni-passau.de          132.231.1.180  12:31  8 Aug 1993
askhp.ask.uni-karlsruhe.de 129.13.200.33 12:25 8 Aug 1993
athene.uni-paderborn.de 131.234.2.32 15:21 6 Aug 1993
bseis.eis.cs.tu-bs.de 134.169.33.1 00:18 31 Jul 1993
clio.rz.uni-duesseldorf.de 134.99.128.3 12:10 8 Aug 1993
cns.wtza-berlin.de 141.16.244.4 16:08 31 Jul 1993

など。whatis compression というコマンドを電子メールまたは Telnet セッションで送ると、次の結果が得られる: RFC 468 Braden, R.T. FTP data compression 1973 March 8; 5p. arc PC compression program deltac Image compression using delta modulation spl Splay tree compression routines squeeze A file compression program uncrunch Uncompression program unsqueeze Uncompression programs

5.6. ARCHIE についてさらに学ぶ​

archie サーバーとの通信方法にかかわらず、オンラインヘルプを利用できる。archie について質問があれば、Archie Group, Bunyip Information Systems Inc. ([email protected]) に書いてほしい。バグ報告、コメント、提案などは [email protected] 宛に送ってほしい。さらに、特定の archie サーバーのデータベース管理者には [email protected] で連絡できる。例: [email protected]。メーリングリスト: [email protected] 登録するには [email protected] 宛にメールを送る。archie はカナダの McGill University Computing Center の Alan Emtage、Peter Deutsch、Bill Heelan によって開発された。現在、archie はカナダの Bunyip Information System Inc. によって保守されている。