Archie
Archie borrows its name from "archive" and from a cartoon character in a comic strip made popular in supermarket check-out lines. Archie is a powerful Unix program used to search for files that you can access via ftp. Archie looks for files and/or directories that match the charachters in a string of charachters with varying degrees of exactitude. While not as comprehensive as a subject-based search program, it can be very useful if you have some idea of the title of the file or direcotry that you want.
Accessing Archie via Unix
To use Archie via Unix, you need to be at the Unix shell. Once there, there are two different ways to use the Archie software to do a search. Working within the Archie program is more involved, but will give you a better idea of the scope and flexibility of the Archie program. The first thing you need to know is whether or not you have direct access to an Archie client (which you do have if your account is on u.cc.utah.edu). To determine if your machine is an Archie client, simply type archie at the Unix prompt.
If the machine you are working on does have the Archie program available, it will start loading andyou should see an archie> prompt. You will now be working within the Archie program.
Telnet to an Archie Server
If the machine you are working on does not have the Archie program available, you will see a message that reads something like this:
If the machine on which you work does not have the Archie program, you can use telnet to connect to an Archie host and use it for your search. At the Unix prompt, simply type telnet followed by the name of the Archie host you want. You can find a list of Archie hosts by checking the most recent Internet guides, or you can try one of the ones listed below.
Once you have Telnetted to the Archie host, you will be asked for a login. Type archie. If you are asked to supply a password, tye your e-mail address.
You should then see the archie and you can proceed with you Archie session.
Archie Variables and Commands
To make full use of the program, it is helpful to know a little about the variables and commands that will enable you to taylor the program for your immediate needs.
Boolean Variables
Boolean Variables are named after George Boole, a 19th century English mathmetician. Boolean variables are essentailly on/off switches. When you set a boolean variable, it is turned on. When you unset a boolean variable, it is turned off.
pager
pager sends results to specific text viewing program (such as more, lesspg. When pager is unset (the default, usually), the results of your search will be displayed continuously, risking entries displayed early in the output being lost to the limitations of your Unix reader. Generally, when the pager is set, the results will be shown to you in less. To page down in less, press the [spacebar]. Press q to quit.
status
status displays a status line at the bottom of the screen.
Numeric Variables
Numeric Variables use numeric values (i.e. numbers) to set parameters for the Archie program.
autologout
autologout tells the program the amount of time to wait for a command before automatically logging you out of the program.
maxhits
maxhits tells the Archie program the maximum number of hits that you want it to return. The higher you set the maxhits variable, the longer the search will take. Also, a high setting for maxhits could return so many hits that you will not be able to read the first few returned, since your Unix browser can only scroll back so far (you can also solve this problem by piping the results of your Archie search into pico, thereby creating a scrollable text file containing your hits).
String Variables
set paramaters for important Archie functions with the use of a srting of characters (usually words).
mailto
Setting mailto [address] stores a mailing address to which find, help , whatisand manpage results. You do not have to set this variable. However, if you do not then you will have to enter your e-mail address for each mailed result.
ouput_format
Setting the ouput_format determines the format in which you will receive output from your Archie search. There are three possible settings for this variable.
verbose (the default variable) ouputs several lines of text with information about the file (including its directory location) and the host maintaining that file.
terse outputs a single line of text with minimal information about the file and its location.
machine outputs a single line with minimal information about the file and raw output for machine manipulation.
sortby
sortby tells Archie the order in which you want search results to be displayed.
none instructs Archie not to sort the results.
filename sorts results aplhabetically by filename.
rfilename sorts results in reverse alphabetical order by filename.
hostname sorts results aplhabetically by name of host machine.
rhostname sorts results in reverse alphabetical order by name of host machine.
size sorts by file size from largest to smallest.
rsize sorts by file size from smallest to largest.
time sorts by file date from newest to oldest.
rtime sorts by file date from oldest to newest.
search
The search variable determines the degree of match required for a hit. The more exact you want your match, the more likely you are to miss the files you want due to even a slight difference in naming. The more relaxed your search is, the more likely you will be swamped with results that are of little or no use to you. There are four differennt settings for the search variable.
exact sets Archie for a basic, straightforward search for files typed exactly (character for character) like the string of characters used in your search request.
sub sets Archie to search for patterns that contain your search string as a substring. sub is not case sensitive.
subcase sets Archie to perform a case-sensitive search for patterns that contain your string as a substring.
regex stands for "regular expreesion." This setting allows you employ compact ways to specify general patterns. It is a more complex setting. Use the help set search command at the Archie prompt for instructions. (Update here coming soon).
In addition to these settings, you can combine exact with any other setting. Doing so will instruct Archie to attempt an exact search first, and the other setting second if the exact search is not successful.
whatis
whatis searches databases of descriptions of files accessible via Anonymous FTP matches in either filenames or descrtiptions to a string of characters you enter. This can save time in finding the best strings for Archie serches, since what you are looking for might deal with the word you have in mind, but might be named something different. For example, the FTP client software you want might not have the sequence "ftp" in it. Using whatis you could learn of many FTP client programs that you might otherwise have missed.
find
find is used to perform a search. Eneter find followed by the query pattern you want Archie to find. On some hosts running older Archie software, find is called prog.
To interrupt an Archie search, press CNTRL-C
mail
mail e-mails search results to the address specified in the mailto variable setting. If mailto variable is not set, you need to type your e-mail address in the mail command line.
help
help displays information to aid you in your use of the Archie program. At the Archie prompt, simply type help followed by the name of the command about which you have a question. If you wnat a list of all of the commands, type help ?. help will return the information that you want in either the pager p[rogram, or in a continuous feed, depending on whether or not the pager is set.
One help has finished its output and you are out of the pager program, you should be at a help> prompt.
At this point, you can either get help by typing the name of another command, or you can return to the the Archie shell by simply pressing the [return] key.
help set can be followed by any variable to get information about how to set Archie variables. Results will be returned according to the same criteria outlined for help.
At the end of a help set output, you will be the help set> prompt. Here you can either enter the name of another variable for more information, or you can exit to the archie> shell by pressing [return].
There are other commands that you can enter at the archie> prompt that will retrieve information that could be helpful in your use ofthe Archie program. Many of these are outputed in the manner specified by the pager setting.
manpage outputs the manual for the Archie host you are using. This can be mailed to your account.
motd outputs the message of the day, which could include important information about the host server.
servers outputs a list of other Archie host servers that could be useful should your favorite Archie host be busy or down.
version outputs the version of Archie software being used by the host. Shop and compare!
quit
quit stops the Archie program and returns you to the Unix shell.
Single-Line Archie Searches
If the server for your account has Archie running on its machine, that machine is an Archie client. Working from an Archie client enables you to do Archie searches including variable settings in a single-line command. Doing so saves keystrokes and the hassle of having to work from the archie> prompt, though some of the flexibility of working within Archie itself is lost.
To use Archie with one-line commands,at the Unix prompt simply type archie folowed by the variable settings and the name of your query. Below is the order of the command with options for variables withing brackets. Warning: make sure the variables you set are not mutually exlcusive, as the computer will execute only one, and it might not be the one you want.
tcsh> archie [-e,-s,-c,-r][-V,-l] [-t] [-mhits] [-ofilename] [query pattern]
Abreviations for Single-Line Archie Searches
Command Function Equivelant in Archie
Search Variables
-e search for exact matches set search exact
-s search substring patterns for match set search sub
-c case sensitive substring search set search case
-r search using regular expression set search regex
-e -s exact search followed by sub search set search exact_sub
-e -c exact search followed by case search set search exact_case
-e -r exact search followed by regex search set search exact_regex
Output Variables
-l output results in machine form set output_format machine
-a output results as Alex filenames
-o[file] output results to designated file
Sort Variables
-t sort file dates from newest to oldest set sortby time
You can also have Archie list the servers known to it by typing archie -L at thhe unix prompt.