Go to the previous, next section.

Detailed Search Information

@everyfooting Author: ensley // Editor: hiren // Texinfo: rootd @| @| 3 December 1994

There are four major search types in Archie:

Exact Searches

Exact searches are useful if you know the exact name of a file you are looking for but do not know the location. This is the fastest search method.

Here is an example of Exact Search

zetar:~$ archie -e joe.tar.Z

Host bode.ee.ualberta.ca

    Location: /pub/unix/EDITORS
           FILE -rw-r--r--      76589  Dec 10 1993  joe.tar.Z

Host ftp.cs.ubc.ca

    Location: /mirror3/linux/tsx-11/binaries/usr.bin/Editors
           FILE -rw-rw-r--      69555  Jun 30 19:11  joe.tar.Z
    Location: /mirror3/linux/tsx-11/sources/usr.bin
           FILE -rw-rw-r--     201239  Jul  1 02:14  joe.tar.Z

Host hpcsos.col.hp.com

    Location: /mirrors/.scsi0/linux/sources/usr.bin
           FILE -r--r--r--     201239  Nov 15 1992  joe.tar.Z

Host faui43.informatik.uni-erlangen.de

    Location: /mounts/epix/public/pub/Linux/MIRROR.tsx-11/binaries
/usr.bin/Editors
           FILE -r--r--r--      69555  Mar 30 1992  joe.tar.Z
    Location: /mounts/epix/public/pub/Linux/MIRROR.tsx-11/sources/usr.bin
           FILE -r--r--r--     201239  Nov 16 1992  joe.tar.Z

Search String   Returned Names
-------------   --------------
joe.tar.Z       joe.tar.Z

Case Sensitive Substring Searches

Case sensitive searches are useful when only part of a filename is known, but (for example) not the most current version. Subcase searching is more precise than substring searching if the case of the part of the filename is known. This is considered a Medium Fast search.

Examples of Case Sensitive Substring Searches

TeX, a text formatting system, is always spelled "TeX" and it's documents have the extension ".tex". Using the case sensitive search in this case, we can distinguish between matches for the program (TeX*) and the program documents (*.tex).

Search String   Returned Names
-------------   --------------
TeX             TeX-3.14.tar.gz, README.TeX, ...
tex             macros.tex, bib.tex, ...

Case Insensitive Substring Searches

Substring searching is useful if a portion of the filename is known, but not the most current version or the case of the filename. This is considered a medium slow search.

Example of Case Insensitive Substring Searches

In the previous example of searching for TeX, a substring search would find filenames with either TeX or tex in them.

Search String   Returned Names
------ ------   -------- -----
  tex           macros.tex, bib.tex, README.TeX, TeX-3.14.tar.gz, ...
  TeX           macros.tex, bib.tex, README.TeX, TeX-3.14.tar.gz, ... 

Regular Expression Searches

Regular expressions allow specifying that the filename begin with a specific string, or specifying two sections of the filename separated bye some unknown characters. The regular expressions used by Archie are different from the ones used in Unix shell commands. This is the slowest of the four searches.

Examples of Regular Expression Searches

Searching for current sun bug fixes:
  [0-9][0-9][0-9][0-9][0-9][0-9]-[0-9][0-9]\.tar
                    Which will find filenames which consist of six digits,
                    then a dash, two digits, a period and then the string
                    tar, for example 100075-09.tar.Z and 100149-03.tar.Z

Searching for complete distributions of emacs 19:
  ^emacs.*19[^-]*\.tar
                    Which will find filenames starting with emacs, having
                    19 somewhere after that, and then any character but a -
                    until a .tar , i.e.: emacs-19.15.tar.gz, 
                    emacs-19.16.tar.gz, emacs-19.17.tar.gz, ... 

Converting File expressions to Archie expressions

Unfortunately, the filename metacharacters with which you are most familiar (the ones in your shell, like *.txt) are slightly different from the expressions that archie uses, so you need to convert your expression into an archie-style regular expression before you can search.

Rules for converting file globs to Archie regular expression format

Examples of Shell expressions converted to Archie expressions

Shell expression                Archie expression
----------------                -----------------
*.txt                           ^.*\.txt$
*.exe                           ^.*\.exe$
x*                              ^x.*$
p*.zip                          ^p.*\.zip$

Go to the previous, next section.