rjs@a.cs.okstate.edu (Roland Stolfa) (11/16/88)
Posting-number: Volume 5, Issue 54 Submitted-by: "Roland Stolfa" <rjs@a.cs.okstate.edu> Archive-name: help echo x - README sed '1,$s/^X//' <<\!FUNKY!STUFF! > README XHello, X XThis is the first distribution of any sort out of me. This program, XI believe, will find genuine use on almost all machines, versions of XUN*X, and environments. This system implements a VMS-like help facility Xfor any and all commands, procedures, etc. X XI hereby release this code into the public domain. Please don't remove Xthe file headers that have my name in them, and don't make profit with Xthis system. Rather, customize it to your own local uses and X X TEACH PEOPLE UN*X WITH THIS SYSTEM!!! X XThis later goal is by FAR more important to me than some stupid copyright Xnotice that could be deleted by anyone anyway. Also, I will not be libel Xfor any damages done to your system, period. AS IS WHERE IS is the motto. X XThis system is NOT intended to replace "man(1)" but rather to supplement Xthe information in the manual pages to first time users. For instance, Xhere at OSU, we use this system on the undergraduate machine to try and Xguide the freshman through the gore of printing, editors, etc. rather Xthan having a professor do it. Also, most of the more often used Xcommands have their manual pages ripped up and stuffed into this format Xto aid the student (you must admit that "help" is a more natural thing Xto type when in need as a first time UN*X user than is "man"). X XBecause we have 43 hosts here in the Computer and Information Sciences Xdepartment, all running some flavor of UN*X, a LARGE amount of time Xwas taken to make this as simple and portable as possible. Therefore, X"curses(3)" was not used (not all systems support it in the same way Xor even have it in a few cases). Also things like ISAM were not used X(portability problems). This implies that this package does not have Xthe 'spiffyness' that some of you may be looking for. X XIn short, this is not going to impress the boss, code-wise. Rather, the Xcontent of the help directorys (the actual text of the various help Xmessages) are what should be devoted a fair amount of time. This is also Xwhere this system shines. True flexibility is achieved by the "DIR" files Xwithin this system. They allow you to setup acronyms for traversing the Xdirectory tree of "TEXT" files. This allows you to have help topics like X"printing a file" or "using the printer in the basement" both point to Xthe help screen on using the "lp" command. This file also allows SYS5 Xsites to use any length 'help file' name and still map it into the small Xfile name SYS5 allows you (14 characters?). X XHidden aliases can also be used. This allows you to also have such things Xas "lp" be a 'help topic' as in the previous paragraph. This makes the Xsystem less painful for those who really do know UN*X, but have forgotten Xone simple flag on "_XXXX_". X XThese are the instructions to compile "help(L)": X X1. Edit the file "help.h" and change the #define's X for ROOTDIR, HELPFILE, and DIRFILE to be locally X acceptable. X X2. Edit the file "Makefile" and fix the definitions of BIN, HELPDIR, X HELPOWN, and HELPGRP so that "make install" will work. X X3. Type "make all". X X4. IF the make completes, play around with it for a while X and make sure it works... X X5. Type "make install". This will install a copy of our help X files, complete with typo's & bad grammar. Most of the X files were typed in by various volunteers here within X the university. You may want to look at them as an X example, you may want to delete them, who knows... X XI bet you think you are done... HA! HA! HA! That's a computer joke! XYou are just barely beginning. Now comes the fun part. :-) X X6. Type "cd <ROOTDIR>". X X7. Start making your "./TEXT" and "./DIR" files. The examples X in this shell archive should prove adequate for examples. X For a subtopic, type "mkdir <subtopic>" and then X "cd <subtopic>" and goto step 7. X XIf you have any questions or further enhancements (or help subtrees :-), Xplease e-mail them to me. I really would like to hear how this thing Xfairs in the big wide world... X XRoland Stolfa XComputing and Information Sciences Department XOklahoma State University X219 Math Sciences Building XStillwater OK 74078 X Xrjs@a.cs.okstate.edu !FUNKY!STUFF! echo x - Makefile sed '1,$s/^X//' <<\!FUNKY!STUFF! > Makefile X# X# HELP - Ver. 1.0 X# X# by R. Stolfa X# X# Modification History X# 08/26/87 Created X# 08/31/87 Added initialize and catch functions X# 09/02/87 Added all .h dependencies X# 07/13/88 Packaged to ship out of OSU X# Added insert to fix problem with uniqueness X# X XBIN = /usr/local XHELPDIR = /usr/help XCFLAGS = -O XHELPOWN = help XHELPGRP = root X XOFILES =\ X main.o append.o catch.o format_help.o free_list.o help.o insert.o \ X initialize.o input_choice.o pchar.o present.o scan_topics.o X Xhelp: $(OFILES) X cc $(CFLAGS) $(OFILES) -o help X Xall: help manual X Xinstall: X cp help $(BIN) X chmod 711 $(BIN)/help X chown $(HELPOWN) $(BIN)/help X chgrp $(HELPGRP) $(BIN)/help X mkdir $(HELPDIR) X cp files $(HELPDIR) X cd $(HELPDIR) ; shar files X @echo "Remember to fix the ownership & permissions" X Xmanual: X nroff -man man.form > help.man X Xclean: X rm -f *.o help a.out core help.man Help.shar X Xshar: X shar README Makefile *.h *.c man.form files > Help.shar X X# X# Dependencies X# X Xmain.o append.o catch.o format_help.o free_list.o help.o \ Xinitialize.o input_choice.o insert.o pchar.o present.o scan_topics.o \ X : global.h X Xmain.o catch.o format_help.o free_list.o help.o \ Xinput_choice.o insert.o pchar.o scan_topics.c \ X : /usr/include/stdio.h X Xinitialize.o \ X : /usr/include/signal.h X Xinput_choice.o \ X : /usr/include/ctype.h !FUNKY!STUFF! echo x - global.h sed '1,$s/^X//' <<\!FUNKY!STUFF! > global.h X/* X * Program : help X * Module : global.h X * Programmer : R. Stolfa X * X * Modification History: X * 08/27/87 Created X * 07/13/88 Cleaned up for distribution X */ X X#include <stdio.h> X#include <signal.h> X#include <ctype.h> X#undef toupper /* to get the non-macro version */ X X#define TRUE 1 X#define FALSE 0 X#define UP 2 X X#define BSIZE 80 X X#define PRINT 0 X#define ACRON 1 X#define TOPIC 2 X X/* X * ROOTDIR is the anchor point for the help tree. It should be a X * publically accessable directory, with all it's submembers being X * readable and executable by all. X */ X#define ROOTDIR "//magma/usr/help" X X/* X * HELPFILE is the basename of the file that will contain the X * text of the actual help information. It should have X * permissions 444. X */ X#define HELPFILE "/TEXT" X X/* X * DIRFILE is the basename of a file that contains the help X * index to file name mappings for the current level of the X * help tree. The format of the data contained in this file X * is as follows.... X * X * <basename><print_flag><help_index_string> X * X * where: X * <basename> relative directory name for help X * <print_flag> is a: X * * for printable X * : for acronym X * <help_index_string> X * text to present as a choice (or use as an X * acronym) at any level in the help tree X */ X#define DIRFILE "/DIR" X X/* X * LIST structure. X * X * This is the standard format of help file lists. X */ Xstruct LIST { X char base[BSIZE]; X char topic[BSIZE]; X struct LIST *prev; X}; X#define prt_list (_list[PRINT]) X#define acr_list (_list[ACRON]) X#define top_list (_list[TOPIC]) X X/*------------------------------------------------------------*/ X X/* X * MACROS X */ X X#define gen_path(x) sprintf (Path, "%s%s%s", ROOTDIR, cur_path, (x)) X X/*------------------------------------------------------------*/ X X/* X * Variables X */ X X#ifdef MAIN X#define extern /* global */ X#endif X Xextern struct LIST *_list[3]; /* list of printable topics */ Xextern char Path[BSIZE], /* true path to help file */ X cur_path[BSIZE];/* curent help path */ Xextern int lines, /* number of lines on the screen */ X catch(); /* interrupt handler */ !FUNKY!STUFF! echo x - append.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > append.c X/* X * Program : help X * Module : append.c X * Programmer : R. Stolfa X * X * Purpose : To append a basename and help topic to the X * specified list X * X * Modification History: X * 08/27/87 Created X * 08/31/87 Changed exit on default to be a call to "catch()" X * - Streamlined the building of nodes X */ X X#include "global.h" X Xappend (cmd, basename, subject) Xint cmd; Xchar *basename, X *subject; X{ X struct LIST *new; X X if ((strlen (basename) == 0) || X (strlen (subject) == 0) || X (cmd < 0) || (cmd >= 3)) X /* X * Bad invocation of "append()" X */ X return; X X /* X * Build the basic LIST structure for the new X * entry X */ X new = (struct LIST *) X malloc (sizeof (struct LIST)); X strcpy (new->base, basename); X strcpy (new->topic, subject); X X /* X * Append the new element onto the correct list X */ X new->prev = _list[cmd]; X _list[cmd] = new; X} !FUNKY!STUFF! echo x - catch.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > catch.c X/* X * Program : help X * Module : catch.c X * Programmer : R. Stolfa X * X * Purpose : To handle all user signals. X * X * Modification History: X * 08/31/87 Created X */ X X#include "global.h" X Xint catch() X{ X /* X * Free the in memory lists to keep user memory from X * growing. X */ X free_list (PRINT); X free_list (ACRON); X free_list (TOPIC); X X /* X * ...Neat up the screen and exit X */ X putchar ('\n'); X exit (0); X} !FUNKY!STUFF! echo x - format_help.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > format_help.c X/* X * Program : help X * Module : format_help.c X * Programmer : R. Stolfa X * X * Purpose : To format the list of available help topics in a X * neat and readable format X * X * Modification History: X * 08/26/87 Created X * 09/02/87 Fixed for more than one line of text (oops!), X * streamlined. X */ X X#include "global.h" X Xformat_help () X{ X struct LIST *p; /* temporary LIST pointer */ X register int cur_col; X X /* X * Screen columns go from 0 to 79 X */ X cur_col = 0; X X for (p = prt_list; p != NULL; p = p->prev) { X /* X * If the addition of the current topic to the screen X * will cause there to be wraparound, skip to the next X * line. X */ X cur_col = (cur_col + 8) - X ((cur_col + 8) % 8) + X strlen(p->topic); X if (cur_col > 79) { X cur_col = strlen(p->topic) + 8; X pchar ('\n'); X } X printf ("\t%s", p->topic); X } X pchar ('\n'); X pchar ('\n'); X} !FUNKY!STUFF! echo x - free_list.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > free_list.c X/* X * Program : help X * Module : free_list.c X * Programmer : R. Stolfa X * X * Purpose : To return to system memory a list of LIST structures X * X * Modification History: X * 08/27/87 Created X * 08/31/87 Changed default exit to be a call to "catch()" X */ X X#include "global.h" X Xfree_list (type) Xint type; X{ X struct LIST *q; X X /* X * Check for valid type X */ X if ((type < 0) || (type >= 3)) { X printf ("free_list: error in type parameter %d\n", type); X catch (); X /* NOT REACHED */ X } X X /* X * Clear the header X */ X q = _list[type]; X _list[type] = NULL; X X /* X * Clear the list X */ X for ( ; q != NULL; q = q->prev) X free (q); X} !FUNKY!STUFF! echo x - help.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > help.c X/* X * Program : help X * Module : help.c X * Programmer : R. Stolfa X * X * Purpose : To more the current "HELPFILE" to the screen. X * X * Modification History: X * 08/27/87 Created X * 09/02/87 Added ("Q"|"q") commands X */ X X#include "global.h" X Xhelp () X{ X FILE *fd; /* help text file */ X int c; /* temp */ X X gen_path (HELPFILE); X X if ((fd = fopen (Path, "r")) == NULL) { X printf ("There is no help text on this subject\n"); X return; X } X X /* X * Note what help subject we are looking at X */ X if (strlen (cur_path) != 0) { X present ("TOPIC: ", " "); X pchar ('\n'); X } X X /* X * Reset the number of lines displayed, and output X * the new help file text. X */ X while ((c = getc (fd)) != EOF) X pchar(c); X X fclose (fd); X X pchar ('\n'); X lines ++; X} !FUNKY!STUFF! echo x - initialize.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > initialize.c X/* X * Program : help X * Module : initialize.c X * Programmer : R. Stolfa X * X * Purpose : To initialize all global data structures X * X * Modification History: X * 08/31/87 Created X */ X X#include "global.h" X Xinitialize() X{ X int i; X X /* X * Catch all signals that might not free up memory.... X */ X signal (SIGINT, catch); X signal (SIGTERM, catch); X X Path[0] = '\0'; X cur_path[0] = '\0'; X X for (i = 0; i < 3 ; i ++) X _list[i] = NULL; X} !FUNKY!STUFF! echo x - input_choice.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > input_choice.c X/* X * Program : help X * Module : input_choice.c X * Programmer : R. Stolfa X * X * Purpose : To selectively change the current help subject X * based on what topic the user chooses to learn X * about next. X * X * Modification History: X * 08/26/87 Created X */ X X#include "global.h" X Xinput_choice () X{ X int done, /* need to parse DIRFILE again */ X i, /* temp */ X j, /* temp */ X count, /* num. of acronym topics that mached */ X topics; /* num. of topics at this level */ X char buff[BSIZE], /* input buffer */ X tmp_path[BSIZE]; /* holding place for cur_path */ X struct LIST *p; /* temp */ X X done = FALSE; X do { X present ("HELP ", " > "); X X if (fgets (buff, BSIZE, stdin) == NULL) X /* X * End help on EOF X */ X return (TRUE); X X /* X * Strip junk out of line X */ X for (i = 0, j = 0; i < strlen(buff); i ++) { X if (buff[i] == '\n') X buff[i] = '\0'; X if (!isspace(buff[i])) X buff[j++] = toupper(buff[i]); X } X X if (strlen(buff) == 0) { X /* X * At this point, we have a request to recurse X * back out of the help tree by one level. X */ X for (i = strlen (cur_path); cur_path[i] != '/'; --i) X ; X cur_path[i] = '\0'; X return (UP); X /* NOT REACHED */ X } X X /* X * OK. We have the topic that the user has requested. X * Now let's try to find some reference to it X */ X count = 0; X topics = 0; X free_list (TOPIC); X for (p = acr_list; p != NULL ; p = p->prev) { X if (strncmp (buff, p->topic, strlen(buff)) == 0) { X insert (TOPIC, p->base, p->topic); X count ++; X } X topics ++; X } X X if (count == 0) { X if (strcmp (buff, "?") != 0) { X present ("Sorry, no documentation on ", " "); X printf ("%s\n", buff); X } X if (topics > 0) { X printf ("Additional information available:\n"); X lines = 2; X format_help(); X } X done = FALSE; X } else if (count == 1) { X /* X * We have only one help subtopic, so traverse X * the tree down that link. X */ X sprintf (cur_path, "%s/%s", cur_path, X top_list->base); X done = TRUE; X } else { X /* X * We have several matches. Therefore, page the X * HELPFILE for each to the screen and stay where X * we are. X */ X lines = 0; X strcpy (tmp_path, cur_path); X for (p = top_list; p != NULL ; p = p->prev) { X sprintf (cur_path, "%s/%s", tmp_path, X p->base); X gen_path(HELPFILE); X help(); X strcpy (cur_path, tmp_path); X } X } X X } while (done != TRUE); X return (FALSE); X} !FUNKY!STUFF! echo x - insert.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > insert.c X/* X * Program : help X * Module : insert.c X * Programmer : R. Stolfa X * X * Purpose : To uniquely insert a basename and help topic to the X * specified list X * X * Modification History: X * 07/13/88 Created X */ X X#include "global.h" X Xinsert (cmd, basename, subject) Xint cmd; Xchar *basename, X *subject; X{ X struct LIST *new, *p; X X if ((strlen (basename) == 0) || X (strlen (subject) == 0) || X (cmd < 0) || (cmd >= 3)) X /* X * Bad invocation of "insert()" X */ X return; X X /* X * Build the basic LIST structure for the new X * entry X */ X new = (struct LIST *) X malloc (sizeof (struct LIST)); X strcpy (new->base, basename); X strcpy (new->topic, subject); X X /* X * Prepend the new element onto the correct list X */ X p = _list[cmd]; X new->prev = _list[cmd]; X X /* X * Check for uniqueness X */ X for (; p != NULL; p = p->prev) { X if (strcmp (new->base, p->base) == 0) { X free (new); X return; X /* NOT REACHED */ X } X } X X /* X * If we get to here, we have a new item. Fix the master X * pointer & go on. X */ X _list[cmd] = new; X} !FUNKY!STUFF! echo x - main.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > main.c X/* X * Program : help X * Module : main.c X * Programmer : R. Stolfa X * X * Purpose : To support a VMS-like help facility X * X * Modification History: X * 08/26/87 Created X * 07/13/88 Fixed end-of-program detection to work correctly X */ X X#define MAIN X#include "global.h" X Xmain (argc, argv) Xint argc; Xchar *argv[]; X{ X int done; X X initialize(); X done = FALSE; X X while (done != TRUE) { X /* X * Free memory to keep user memory from growing X */ X free_list (PRINT); X free_list (ACRON); X free_list (TOPIC); X X /* X * If we are recursing out of the help tree, X * do not print the help stuff... X */ X lines = 0; X if (done != UP) X help(); X scan_topics (); X if (done != UP) X format_help (); X done = input_choice (); X X if ((done == UP) && (strcmp (Path, ROOTDIR) == 0)) X done = TRUE; X } X printf ("\n"); X} !FUNKY!STUFF! echo x - pchar.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > pchar.c X/* X * Program : help X * Module : pchar.c X * Programmer : R. Stolfa X * X * Purpose : To provide a very simple "more" like output stream for X * looking at the text in "HELPFILE" and all the topics X * listed in "DIRFILE". X * X * Modification History: X * 08/27/87 Created X */ X X#include "global.h" X Xpchar (c) Xint c; X{ X char in_buff[BSIZE]; /* input buffer */ X X /* X * If this is the recursive call, do not X * output anything X */ X if (c != '\0') X putchar (c); X X /* X * If this is the newline, then increment the X * line count X */ X if (c == '\n') X lines ++; X X /* X * If this is the one to pause on, then do so X */ X if (lines == 21) { X printf ("Press RETURN to continue"); X (void) fgets (in_buff, BSIZE, stdin); X lines = 0; X } X} !FUNKY!STUFF! echo x - present.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > present.c X/* X * Program : help X * Module : present.c X * Programmer : R. Stolfa X * X * Purpose : To generate a topics line without '/'s in it. X * X * Modification History: X * 08/31/87 Created X */ X X#include "global.h" X Xpresent (str1, str2) Xchar *str1, X *str2; X{ X int i; /* temp */ X X /* X * Make a line like "/vi/join/lines" more readable as X * " vi join lines" X */ X printf ("%s", str1); X for (i = 0; i < strlen (cur_path); i ++) X if (cur_path[i] == '/') X putchar (' '); X else X putchar (cur_path[i]); X printf ("%s", str2); X} !FUNKY!STUFF! echo x - scan_topics.c sed '1,$s/^X//' <<\!FUNKY!STUFF! > scan_topics.c X/* X * Program : help X * Module : scan_topics.c X * Programmer : R. Stolfa X * X * Purpose : To scan the current directory for all "topic" X * directories in the DIRFILE file. X * X * Modification History: X * 08/26/87 Created X * 08/31/87 Changed input routine to change spaces in the topic X * field to be underscores. X */ X X#include "global.h" X Xscan_topics () X{ X FILE *fd; /* DIRFILE descriptor */ X int i, /* temp */ X count; /* is there any help? */ X char buff[BSIZE], /* for reading DIRFILE */ X help_topic[BSIZE], /* used to parse DIRFILE lines */ X base_path[BSIZE], /* used to parse DIRFILE lines */ X prt_flag; /* used to parse DIRFILE lines */ X X count = 0; X gen_path(DIRFILE); X X if ((fd = fopen (Path, "r")) == NULL) { X printf ("There are no subtopics for this area.\n"); X return; X } X X /* X * Here we need to read in the lines in DIRFILE X * that are of the format X * <basename><print_flag><help_topic_string> X * and capitalize the <help_topic_string>. X * X * if <print_flag> is a "*" then the <help_topic_string> is X * for viewing. X * X * if <print_flag> is a ":" then it is an acronym for lookups. X */ X X while (fgets (buff, BSIZE, fd) != NULL) { X X for (i = 0; X i < strlen(buff) && buff[i] != ':' && buff[i] != '*'; X i ++) X base_path[i] = buff[i]; X base_path[i] = '\0'; X X if (i < strlen (buff)) X prt_flag = buff[i]; X else X /* Bad input line */ X continue; X X strcpy (help_topic, &buff[i+1]); X for (i = 0; i < strlen (help_topic); i ++) { X help_topic[i] = toupper (help_topic[i]); X if (help_topic[i] == ' ') X help_topic[i] = '_'; X if (help_topic[i] == '\n') X help_topic[i] = '\0'; X } X X /* X * At this point, we have a fairly legal line, X * so, let's finish it off... X */ X X if ((strlen (base_path) == 0) || (strlen (help_topic) == 0)) X continue; X count ++; X X if (prt_flag == '*') X /* X * Append this line to the list of things to X * output as topics X */ X append (PRINT, base_path, help_topic); X X /* X * Append this line to the list of acronymns X * for reference later... X */ X append (ACRON, base_path, help_topic); X } X X fclose (fd); X X if (count == 0) { X printf ("There are no subtopics for this area.\n"); X return; X } X} !FUNKY!STUFF! echo x - man.form sed '1,$s/^X//' <<\!FUNKY!STUFF! > man.form X.TH HELP L X.SH NAME Xhelp - a VMS-like help facility for XENIX X.SH SYNOPSIS X.B help X.br X.SH DESCRIPTION X.I help Xis intended to be a more useful system than the native X.I man(1) Xsupplied with X.I XENIX. XIt is styled after the very popular and useful VMS HELP facility, in that Xit is tree structured and interactive. X.PP X.I help Xis very configurable. In essence, you decide what help "topics" map Xto what files. I.E. you can have more than one topic, or acronym, map Xto the same help subtopic. An example would be having the words "lp" Xand "printing" both map to the X.I help Xsubtopic "lp-command". Also, you need not have the subtopic "lp" even Xshow up in the help screen. If you wish to have acronyms, as described Xabove, it is site taylorable using the DIRFILE (as described below in XINTERNALS). X.PP XAll of the files and directories contained in the system are all plain Xtext files, with an easy format that can be used to your advantage. X.sp 1 X.SH "INTERNALS" X.I help Xuses a tree structured file data-base to store all help. Each node (or Xdirectory) has at least one file. This file, called X.I ./TEXT Xcontains the actual text of the help message for this subtopic. If there Xare any subtopics below this one, their X.I ./TEXT Xfiles are held in subdirectories of this one, and then there is a file X.I ./DIR Xthat maps the directory name to the subtopic to display. This will allow X.I SYSV Xsystems with limited directory name lengths map much longer descriptions Xto shorter file names. X.PP XAlso contained in the X.I ./DIR Xfile is a similar mapping for acronyms of the subsequent subtopics. In the Xexample above with lp, a sample portion of a help file would be X.sp 1 X lp-command*lp X.br X lp-command:printing X.br X lp-command:getting output X.sp 1 XWhere the "*" in the first line implies that the "topic" name "lp" is to Xbe printed as a possible topic for help, and the subtopics "printing" and X"getting output" are acronyms for traversing the to the "lp-command" Xsubdirectory to get at the next X.I ./TEXT Xfile. X.sp 1 X.SH "FILES" X"/usr/help/...." - Root directory for help X.br X"./TEXT" - Help text X.br X"./DIR" - Directory files for next subtopic X.PP X.SH DIAGNOSTICS XThere are no real diagnostics. However, if you reach a point in the Xhelp system where you know you have a "subtopic" but cannot reach it, Xsearch for correct premissions (0444 for X.I ./TEXT Xfiles, and (0555 for X.I ./DIR Xfiles). X.sp 1 X.SH AUTHOR XRoland J. Stolfa X.br XDepartment of Computing and Information Sciences X.br XOklahoma State University X !FUNKY!STUFF! echo x - files sed '1,$s/^X//' <<\!FUNKY!STUFF! > files Xecho x - DIR Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR XXcancel*stop a print job XXcancel:cancel XXcat*look at a file XXcat:cat XXcd*change directory XXcd:cd XXfiles*xenix file struture XXfiles:files XXhelp*help XXkermit*kermit XXkermit:upload XXkermit:download XXless*viewing a stream XXless:less XXlp*printing XXlp:lp XXlpstat*show queue XXlpstat:lpstat XXls*directory XXls:ls XXmail*sending mail XXmail:mail XXmkdir*making a subdirectory XXmkdir:mkdir XXmore*scan a file XXmore:more XXod*looking at a non-text file XXod:od XXpassword*changing your password XXpassword:password XXpassword:passwd XXrm*deleting a file XXrm:rm XXrmdir*removing a directory XXrmdir:rmdir XXusers*who is logged on to which machine XXusers:users XXwho*who is logged on to what port XXwho:who XXwrite*talking with other users XXwrite:write X!FUNKY!STUFF! Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXThis is the help facility for the Computer Science Undergraduate XXComputing Facility (running on Intel 286/310's). In response to XXthe "HELP >" prompt, you can: XX XX + Type any help topic that you see listed for further XX help on that subject. XX XX + Press return to back out of the help facility by XX one level (or back to the shell). XX XX + Press <DEL> or <ctrl-D> to get back to the shell. X!FUNKY!STUFF! Xmkdir cancel Xcd cancel Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX"cancel" cancels line printer requests that were made by the "lp(1)" XXcommand. The command line arguments may be either request ids (as XXreturned by "lp(1)") or printer names (as given by "lpstat(1)"). XX XXSpecifying a request id cancels the associated request even if it XXis currently printing. Specifying a printer cancels the request XXwhich is currently printing on that printer. XX XXThe general syntax is: XX XX cancel [ids] [printers] X!FUNKY!STUFF! Xcd .. Xmkdir cat Xcd cat Xecho x - DIR Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR XXcopying*copying files XXpiping*piping files X!FUNKY!STUFF! Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXThis XENIX facility allows you to look at the contents of a file. XXYou do this by typing: XX XX % cat <filename> XX XXThis will display to your screen the entire contents of the file <filename>. XX XXNOTE: You will probably want to use "more(1)" or "less(l)" to view XX the contents of a file. These commands page the data to your XX screen rather than just list it like "cat(1)". X!FUNKY!STUFF! Xmkdir copying Xcd copying Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXYou can use "cat (1)" to copy any file that you have read access to. XXThis is done using the file redirection capabilities of UNIX in the following XXmanor... XX XX If you want to copy the file "//magma/usr/joe/a.out" to XX a new file "//magma/usr/joe/prog1", you can type the following... XX XX $ cat <//magma/usr/joe/a.out >//magma/usr/joe/prog1 XX $ XX XX OR if you are already in the directory XX "//magma/usr/joe", you can type XX XX $ cat <a.out >prog1 XX $ XX XXNOTE: Several better methods exist. See Also "mv(1)" and "cp(1)". X!FUNKY!STUFF! Xcd .. Xmkdir piping Xcd piping Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXAnother use for "cat (1)" is to be the source of a file for a pipe. XXUsing "cat (1)" in this way works, but is not necessary the best way to XXget the job done. XX XX Lets say that the file "//magma/usr/joe/prog1.dat" is the XX source input file for the program "//magma/usr/joe/prog1". XX Also, let's assume you are already in the directory XX "//magma/usr/joe". To use the data file as input to the XX program you COULD do the following... XX XX $ cat prog1.dat | prog1 XX $ XX XXNOTE: A better way of doing this is the following XX XX $ prog1 < prog1.dat XX $ X!FUNKY!STUFF! Xcd .. Xcd .. Xmkdir cd Xcd cd Xecho x - DIR Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR XXdot*Going nowhere XXdot-dot*going up XXdown*moving down XXsideways*moving sideways XXup*moving up X!FUNKY!STUFF! Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXUnder UNIX, the entire directory structure is an inverted tree. This XXstructure is shown in the file names that are used to access everything XXin the system. For example XX XX //magma/usr/joe/foo/a.out XX XXdescribes a file on machine "magma", under the first level directory XXheading "usr", under the second level directory heading "joe", under XXthe third level directory heading "foo", NAMED "a.out". I.E. XX XX //<Machine>/<Directory 1>/.../<Directory N>/<File name> XX XXTo traverse this type of directory structure, the standard UNIX command XX"cd (1)" is used. This command allows you to 'walk' a directory from point XX'a' to point 'b' easily. XX XXIt will also allow you to go from machine to machine. XX XXAbsolute paths may also be used to get from a place in sub-sub-directory XX'a' to a place in sub-directory 'b' (for example) without having to XXtraverse the entire path between these two directories. X!FUNKY!STUFF! Xmkdir dot Xcd dot Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXThere are several unique names in the XENIX file structure. One of these XXare "." This file name refers to the current directory file. Therefore XX"file1" refers to the same file as "./file1" X!FUNKY!STUFF! Xcd .. Xmkdir dot-dot Xcd dot-dot Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXThere are several unique names in the XENIX file structure. One of these XXis ".." This file name refers to the current directory's parent directory XXfile. Therefore if "foo" is the parent directory of "bar" (i.e. XX"/usr/foo/bar" say), then the directories "/usr/foo" and "/usr/foo/bar/.." XXboth refer to the same directory. X!FUNKY!STUFF! Xcd .. Xmkdir down Xcd down Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXIf you were in the _directory_ "//magma/usr/joe/foo" looking XXat the file "a.out", and you wanted to descend to the subdirectory XX"bar" you have to type XX XX $ cd bar XX $ XX XXThis will move you down the directory link to the subdirectory specified XXby the complete path XX XX "//magma/usr/joe/foo/bar" XX XXSimilarly, if you know that the directory path XX XX "//magma/usr/joe/foo/bar/sue/ann/bob" XX XXexists, and you are at the directory XX XX "//magma/usr/joe" XX XXand you wish to get to the before mentioned directory, you can type XX XX $ cd foo/bar/sue/ann/bob XX $ XX XXThis is called a "relative path" to the file XX"//magma/usr/joe/foo/bar/sue/ann/bob" and this will put you in the XXdescribed directory just as if you had typed XX XX $ cd //magma/usr/joe/foo/bar/sue/ann/bob X!FUNKY!STUFF! Xcd .. Xmkdir sideways Xcd sideways Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXIn this example, if you want to jump from the directory XX XX "//magma/usr/joe/foo" XX XXto a directory XX XX "//earth/usr/sue/ann/bob" XX XXYou can type the following to get you there XX XX $ cd //earth/usr/sue/ann/bob XX $ XX XXPlease note that you do not even have to be on the same physical machine XXto descend to a subdirectory of that machine. All that is required is that XXyou know the path to the subdirectory that you want AND that you have the XXaccess permission of who ever owns that file/directory. X!FUNKY!STUFF! Xcd .. Xmkdir up Xcd up Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXIf you were in the _directory_ "//magma/usr/joe/foo" looking XXat the file "a.out", and you wanted to return to the directory XX"//magma/usr/joe", all you have to type XX XX$ cd .. XX$ XX XXThis will move you up the return link to the directory above you. X!FUNKY!STUFF! Xcd .. Xcd .. Xmkdir files Xcd files Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXThere are several unique problems that are related to Open-Net, XXthe software package that gives the Intel's their collective identity. XXThese relate to the fact that if you have a program that tries to open XXa file "foo" in your current working directory, the "open(2)" call will XXwork. However, if you try to open a file "/usr/joe/foo", this will FAIL. XXThe reason is that the local machine that you have logged onto will try XXto find a file "/usr/joe/foo" on IT'S file system, rooted from the top, XXand will FAIL. To get the above example to function, you should have your XXopen call try to open "//machine/usr/joe/foo". X!FUNKY!STUFF! Xcd .. Xmkdir help Xcd help Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXThis is a VMS style help facility. It is intended to be more helpful XXfor first time users of the XENIX (or UNIX) operating system than is the XXnative "man (1)" help system that normally comes with this operating system. XXIn addition to being more helpful, we don't have the "man (1)" system XXon XENIX, so I had to come up with something... XX XXIn any case, this system is a tree-like help facility. For each entry XXin the help tree, there can be many children below each entry. XXTo move around in the tree, you go to each point in the tree and then XXgo down one level. To go back up, you travel the link from the child XXto the parent. I.E. XX XX ------- Main Subject --------- ... XX / \ \...\ XX / \ XX Child Subject Other Child Subjects ... XX / | \ / | \ XX Grand Children Subjects Grand Children Subjects ... XX XXTo exit the help facility, just type <CR> enough times to move up the XXchildren links to exit the "Main Subject" node, type <CTRL-D>, or <DEL>. XX XXIn addition, this help system runs over Open-Net, an Intel software package XXthat gives the Intel 310's their collective identity. This allows there to XXbe only one copy of the help system on the collective six machines of the XXIntel system. X!FUNKY!STUFF! Xcd .. Xmkdir kermit Xcd kermit Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX THE KERMIT FILE TRANSFER PROTOCOL XX XX November 1986 XX XX XX XXKermit is an error-correcting protocol for transferring sequential files be- XXtween computers of all sizes over ordinary asynchronous telecommunication XXlines. Kermit is non-proprietary, thoroughly documented, and in wide use. The XXprotocol and the original implementations were developed at Columbia University XXand have been shared with thousands of other institutions all over the world, XXmany of which have made significant contributions of their own. Kermit is XXpresently available for more than 200 different machines and operating systems, XXand additional versions are always under development. XX XXAll Kermit programs perform file transfer using the Kermit file transfer XXprotocol. In addition, Kermit programs for personal computers also provide XXterminal emulation, usually of the DEC VT52, VT100, or similar terminal, and XXsome of the mainframe Kermit programs are capable of initiating connections, XXacting as dumb terminals to remote systems. Kermit programs work only over XXasynchronous RS-232 direct or dialup connections, or connections that simulate XXthem. For file transfer to take place, there must be a Kermit program running XXon each end of the connection, one on each computer. XX XXThere are Kermit programs for most popular "generic" operating systems, includ- XXing UNIX, MS-DOS, and CP/M, and for mainframes and minicomputers from Bur- XXroughs, Cray, CDC, Data General, DEC, Gould (SEL), Harris, Honeywell, XXHewlett-Packard, IBM, Perkin-Elmer (Concurrent), Prime, Sperry/Univac, and Tan- XXdem, and for particular microcomputers and workstations from Apple, Apollo, XXAtari, Commodore, IBM, Tandy, and many others, written in a wide variety of XXlanguages including many different assemblers, plus high-level languages like XXAlgol, Basic, Bliss, C, Forth, Fortran, Lisp, Mumps, Pascal, PL/I, and Ratfor. XXA complete list of currently available Kermit programs accompanies this flyer. XX XXHere are some details about the several most popular Kermit programs. Most of XXthe following implementations are capable of both local and remote operation, XXserver and client modes, text and binary file transfer, and support a full XXrange of communications options -- speed, parity, duplex, flow control, hand- XXshake -- to allow adaptation to a wide variety of hosts (including IBM XXmainframes) and communication media. XX XX - IBM PC Kermit Version 2.29 runs under PC-DOS version 2.0 and later on XX the entire IBM PC family, as well as on IBM "clones" and compatibles. XX It provides nearly complete DEC VT102 terminal emulation at speeds up XX to 38.4K baud fully buffered and interrupt driven -- and includes XX support for color displays, compatibility with various "desktop XX organizers," and selectable emulation of other terminals. There are XX also versions of Kermit specifically tailored for a variety of other XX MS-DOS systems, including the DEC Rainbow, Zenith-100, Victor 9000, XX and many others, and there is a "generic" MS-DOS Kermit for systems XX not explicitly covered. XX XX - Macintosh Kermit Version 0.8(34) runs on the entire Apple Macintosh XX family, from the original 128K Mac to the Mac/XL, to the fully con- XX figured Macintosh-Plus. It provides fairly complete VT102 emulation XX at speeds up to 9600 baud, and file transfer speeds up to 56Kb. XX XX - UNIX Kermit is distributed only in C-language source form. It may be XX built for nearly any machine running practically any post-V6 varia- XX tion of UNIX, including V7, Berkeley 2.x and 4.x, AT&T System III and XX System V, Xenix, Venix, and so on. The same source also serves as a XX basis for Macintosh, Amiga, and other Kermit programs. XX XX - VAX/VMS Kermit is written in Bliss, but it is also distributed in XX Macro-32 and hex form, so that a Bliss compiler is not required. XX Other versions exist in C and Pascal. XX XX - IBM mainframe Kermit programs for VM/CMS and MVS/TSO work with XX asynchronous ASCII TTY connections through 3705 or equivalent front XX ends, or through Series/1, 7171, or similar protocol converters that XX support the Yale ASCII Communications System; beyond this exception, XX Kermit cannot be used to transfer files in the IBM 3270-style XX full-screen terminal environment. There are no Kermit programs for XX DOS/VSE, or IBM minis like the System/34 and System/38, because these XX systems do not support asynchronous ASCII communications. Currently, XX IBM mainframe Kermits run only in remote mode. XX XXThe Kermit software -- including source code -- is furnished free and without XXlicense, and without warranty of any kind, and neither Columbia University, nor XXthe individual authors, nor any institution that has contributed Kermit XXmaterial, acknowledge any liability for any claims arising from the use of Ker- XXmit. Furthermore, it must be stated that the quality of the Kermit programs XXvaries -- some are polished, well-documented professional products and others XXare not. Kermit programs are contributed by public-spirited volunteers, and XXColumbia University does not wish to discourage such contributions by subject- XXing them to a rating system. Since source code is provided for all implemen- XXtations, users may make improvements or write documentation where it is lacking XXand are encouraged to contribute their work back to Columbia for further dis- XXtribution. Under certain conditions (described in a separate document) XXsoftware producers may include Kermit protocol in their products. XX XXAlthough the Kermit software is free and unlicensed, Columbia University cannot XXafford to distribute it for free because the demand is too great. To defray XXour costs for media, printing, postage, labor, and computing resources, we re- XXquire moderate distribution fees from those who request Kermit directly from XXus. The schedule is given on the accompanying Kermit Order Form. You may also XXobtain Kermit programs from many other sources, including user groups, net- XXworks, dialup bulletin boards, and you may copy them from friends, neighbors, XXand colleagues. In fact, you may obtain Kermit programs from anyone who is XXwilling to share them with you, just as you may share them yourself. XX XXKermit is distributed by Columbia University primarily on 9-track magnetic XXtape, suitable for reading on most mainframe and minicomputers. It is assumed XXthat Kermit will be ordered in this form by institutional computer centers, XXwhose professional staff will take the responsibility for "bootstrapping" the XXmicrocomputer versions from the tape to diskettes for their users. The tapes XXinclude source code and any available documentation for each Kermit implemen- XXtation, and in some cases also binaries (usually encoded in hex or other print- XXable format). Selected microcomputer versions are also available from Columbia XXon diskette, and from diskette services, user groups, and individual volun- XXteers, some of whom are listed on a separate flyer. XX XXDocumentation includes the Kermit User Guide (about 250pp) and the Kermit XXProtocol Manual (90pp); one printed copy of each is included free with any tape XXorder. Other documents may be ordered separately, including addition copies of XXthe manuals, the manuscript from the Kermit article that appeared in the June XXand July 1984 issues of BYTE Magazine (36pp), and the new book Kermit, A File XXTransfer Protocol by Frank da Cruz, 400pp, Digital Press (1987). XX XXThe Kermit book is a comprehensive introduction and guide to Kermit; it in- XXcludes an overview of what Kermit is for and how it works, with tutorials in XXcomputer file systems and data communications, a generalized command reference, XXa troubleshooting guide, a complete protocol specification with program ex- XXamples, a glossary, an index, and numerous tables, figures, and illustrations. XXThe User Guide contains detailed, specific instructions for the use of the most XXpopular Kermit programs (MS-DOS, VMS, UNIX, Apple, etc). The Protocol Manual XXis an older description of the Kermit protocol, which lacks the organization XXand program examples from the book. If you have the book, you don't need the XXProtocol Manual but you will still need the User Guide. XX XXOnce you receive Kermit, you are encouraged to copy and redistribute it, with XXthe following stipulations: Kermit should not be sold for profit; credit should XXbe given where it is due; and new material should be sent back to Columbia XXUniversity so that we can maintain a definitive and comprehensive set of Kermit XXimplementations for further distribution. And finally, please use Kermit only XXfor peaceful and humane purposes. XX XXORDERING INFORMATION: XX XXAll Kermit material is available on magnetic tape as described below. Selected XXKermit programs may also be ordered on diskette; see the order form. Tapes in- XXclude program source code, diskettes generally do not have room for source. XX XXThere are 3 separate Kermit tapes: A, B, and C. There are too many Kermit files XXto fit on fewer tapes. All tapes are half-inch, 2400-foot, 9-track, 1600bpi, XXodd parity. They are available ONLY in the following formats: XX XX ANSI: ANSI labeled ASCII, format D (variable length records, VMS COPY) XX TAR: UNIX TAR format (written on a VAX with 4.2BSD or Ultrix-32) XX OS: IBM OS standard labeled EBCDIC, format VB (variable length records) XX CMS: IBM VM/CMS VMFPLC2 format (unlabeled) XX DEC-10: DECsystem-10 Backup/Interchange format (unlabeled) XX DEC-20: DECSYSTEM-20 DUMPER format (unlabeled) XX XXTape blocksizes, when applicable, are our choice and in the range 8K-10K (use XXof smaller blocksizes could overflow the tapes). NO OTHER FORMATS ARE AVAIL- XXABLE. We can NOT make 800bpi or 6250bpi tapes, unlabeled tapes (except as XXnoted above), fixed-block tapes, or custom tapes of any kind. If none of the XXabove formats looks familiar to you, then specify ANSI -- this is an industry XXstandard format that should be readable by any computer system (ANSI specifica- XXtions are provided on paper). VAX/VMS sites should specify ANSI. XX XXTAPE "A" CONTAINS: XX - The more popular microcomputer (PC, workstation) Kermit implemen- XX tations. XX XXTAPE "B" CONTAINS: XX - The more popular mainframe and minicomputer Kermit implementations. XX XXTAPE "C" CONTAINS: XX - Esoteric, less popular, or redundant Kermit implementations. XX - Text formatter source for the Kermit User Guide and Protocol Manual. XX - Archives of old mail, other large documents. XX XXEXCEPTIONS: XX - C-Kermit is the basis of all Unix Kermit implementations, mainframe XX and micro, and also for Commodore Amiga and Apple Macintosh Kermits. XX It is on tape B. XX XX XX XX XX TO ORDER KERMIT, fill out the Kermit Order Form and send it to: XX __________________________________________________ XX XX Kermit Distribution XX Columbia University Center for Computing Activities XX 612 West 115th Street XX New York, NY 10025 (USA) XX __________________________________________________ XX XX XXPrepayment by check is encouraged; an additional order processing fee is re- XXquired if we must issue an invoice. North American orders are shipped by XXdelivery service or first class US mail, with shipping costs included. Over- XXseas orders are shipped first class US (air) mail, with an additional shipping XXcharge required. Orders are normally processed within 2-4 weeks of receipt, XXbut firm delivery schedules or methods cannot be guaranteed. USA rush service XXis available for an extra fee (see order form *). X!FUNKY!STUFF! Xcd .. Xmkdir less Xcd less Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XXTyping less <filename> at the command prompt will cause the computer to XXdisplay the file one screen at a time. The computer will not go to the XXnext page of text until you press the spacebar. You may also scroll XXtext one line at a time with the return key, but you must press the XXreturn key for each new line of text. To get out of "less" you must XXpress "q" to quit. XX XX"less(L)" is different from "more(1)" in that you may scroll backwards XXwith "less(L)". The 'help' key in "less(L)" is 'h'. XX XXFor example, the command XX XX% less foo XX XXwould display the file named foo one screen at a time, or until you XXtype 'q'. X!FUNKY!STUFF! Xcd .. Xmkdir lp Xcd lp Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX"lp(1)" is the command to print a file. Currently there are several XXdifferent printer queue's supported. A current list of the available XXprinters can be seen by giving the "lpstat -p" command. XX XXTypical printers that are usually available for CSUG users are: XX ag - Ag Hall 241 printer XX parker - The basement of the Parker Residence hall XX ms222 - The CIS cluster of AT&T Unix PC's in Math Sciences 222 XX (ms222 is available 8am-5pm M-F only). XX ms214 - The CIS graduate cluster of AT&T PC's in Math Sciences XX 214 XX bus - Business Building 009 XX es1 - Engineering South 113 XX es3 - Engineering South 413 XX iba - Iba Hall 111-A XX ps - Physical Sciences 102 XX stout - Stout Hall 043 XX ucat - University Center - Tulsa XX ucc2 - Math Sciences Basement cluster MS-013 XX XX XXThese printers are designated by the following syntax XX XX lp -d<queue> XX XXWhere <queue> is one of the printers shown to be available by the XX"lpstat -p" command. XX XXFor example, to print a file named foo on the 'parker' printer, you type XXthe following command: XX XX lp -dparker < foo X!FUNKY!STUFF! Xcd .. Xmkdir lpstat Xcd lpstat Xmkdir -r Xcd -r Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXThe "-r" option to "lpstat(1)" gives the current status of the XXline printer scheduler. If "lpstat(1)" returns with XX XX scheduler is not running XX XXYou should contact the secretaries in MS-218 and report the XXname of the machine you are logged into, as well as the fact XXthat the scheduler is not running X!FUNKY!STUFF! Xcd .. Xmkdir -t Xcd -t Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXThe "-t" option to the "lpstat(1)" command will give you the XXstatistics for the entire "lp(1)" family of commands as well XXas the current status of the print queue, which jobs are currently XXbeing serviced, and which printer queue's are accepting jobs XXcurrently. X!FUNKY!STUFF! Xcd .. Xmkdir -u Xcd -u Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXThe "-u" option of the "lpstat(1)" allows you to cut down the XXlist of queue'ed jobs to those belonging to a particular user. XX XXAn example is in order... XX XX lpstat -uroot XX XXWould give a complete list of all jobs owned by the user "root" XXto any destination on the current machine. X!FUNKY!STUFF! Xcd .. Xecho x - DIR Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR XX-r*scheduler XX-t*everything XX-u*by user XX-r:-r XX-t:-t XX-u:-u X!FUNKY!STUFF! Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX"lpstat(1)" is the command that will check on the printer system. XXIt reports the overall list of jobs in the print queue (for each XXprinter), the status of the scheduler, and several other statistics. X!FUNKY!STUFF! Xcd .. Xmkdir ls Xcd ls Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX"ls" stands for "list directory". For you VMS users, this is "DIRECTORY". XXThe several options listed below are useful mostly in shell scripts XX(NOTE: see the help page on your shell for further details). There are XXseveral that are of prime help during the usual running. They are XXthe "-a" and "-l" options. X!FUNKY!STUFF! Xcd .. Xmkdir mail Xcd mail Xecho x - DIR Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR XXreading*reading XXwriting*writing X!FUNKY!STUFF! Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXThe "mail(L)" command is used to transfer messages from one user to XXanother. There are two command line invocations of mail that XXdo vastly different things. They are for reading and writing mail. X!FUNKY!STUFF! Xmkdir reading Xcd reading Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXTo read your mail, you should use the following command line... XX XX % mail XX XXWhat this will present you with is either the list of mail message XXheaders that you have not read (or have saved) or the message XX XX No mail XX XXif you have no new mail. XX XX XXThe commands that are in effect during this mode of operation are XXvery well covered in the internal help facility of mail as accessed XXby the "?" command. X!FUNKY!STUFF! Xcd .. Xmkdir writing Xcd writing Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXTo write mail to a user, you must have their address. Once you have XXthat, you can send them mail by the following command line XX XX % mail bob XX <your message here> XX . XX . XX . XX <control-D as the first character of a line> XX <A SHORT PAUSE> XX % XX XXThis will send some message to the user "bob" on the Intel system. X!FUNKY!STUFF! Xcd .. Xcd .. Xmkdir mkdir Xcd mkdir Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX XX Name XX XX mkdir - Make Directory XX XX Format XX XX mkdir directory-name XX XX Description XX XX The mkdir command will create a directory in the current XX directory that the user is in if the user has write and XX execute access permission to the parent directory of the XX directory that the user is creating. XX The mkdir command can also create the subdirectories at the XX same time that it creates the main directory. For example XX XX mkdir foo/foo1/foo2 XX XX would create a directory named foo with subdirectories named XX foo1 and foo2. XX XX X!FUNKY!STUFF! Xcd .. Xmkdir more Xcd more Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX XX XX XX Name XX XX more - Views files one page at a time. XX XX Description: XX XX Typing more <filename> at the command prompt XX will cause the computer to display the file one XX screen at a time. The computer will not go to XX the next page of text until you press the spacebar. XX You may also scroll text one line at a time with XX the return key, but you must press the return key XX for each new line of text. XX To get out of "more" you can either view the XX whole file or press the delete key. XX XX For example, the command XX XX % more foo XX XX would display the file named foo one screen at a XX time. XX X!FUNKY!STUFF! Xcd .. Xmkdir od Xcd od Xmkdir -c Xcd -c Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX Utility XX XX od - octal dump XX XX Option XX XX -c XX XX Description XX XX The -c option of the od utility will produce XX a character dump. od will display certain XX nonprintable characters as characters preceded XX by a backslash. Any nonprinting characters that XX are not in the following list will appear as XX 3-digit octal numbers. XX XX symbol character XX ------ --------- XX \O null XX \b backspace XX \f formfeed XX \n newline XX \r return XX \t tab XX X!FUNKY!STUFF! Xcd .. Xmkdir -d Xcd -d Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX Utility XX XX od - octal dump XX XX Option XX XX -d XX XX Description XX XX The -d option used with the od utility will XX produce a decimal dump of your file. XX X!FUNKY!STUFF! Xcd .. Xmkdir -x Xcd -x Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX XX Utility XX XX od - octal dump XX XX Option XX XX -x XX XX Description XX XX The -x option used with the od utility will XX produce a hexidecimal dump of your file. XX X!FUNKY!STUFF! Xcd .. Xecho x - DIR Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR XX-c*ascii XX-d*decimal XX-x*hex XX-c:-c XX-d:-d XX-x:-x X!FUNKY!STUFF! Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX Name XX XX od - Short for octal dump XX XX Description: XX XX The od utility will dump the contents of an XX executable or object file into a file so that XX you may view the contents. The syntax for the XX od utility is XX XX od <-option> file XX XX where file is the pathname of the file that od XX dumps. If you do not specify an option, the XX utility will default to an octal dump. X!FUNKY!STUFF! Xcd .. Xmkdir password Xcd password Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX Name XX XX passwd - Change Password XX XX Description XX XX The command passwd will allow the user to change his/her XX password into the computer. The format for the command passwd XX is as follows: XX XX XX 1) Type "passwd" at the command prompt. XX XX 2) The computer will respond with "Old Password:" XX You should then type in your old password and hit XX return. XX XX 3) The computer will respond with "New Password:". XX You should then type in your new password and hit XX return. XX XX 4) The computer will respond with "Re-enter new password:". XX You should then re-enter your password and hit return. XX If the new password and the re-entered password do not XX match, then the computer will prompt you again for the XX new password. XX X!FUNKY!STUFF! Xcd .. Xmkdir rm Xcd rm Xmkdir -f Xcd -f Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXUsing the -f option with the rm command will remove a file XXthat you don't have write permission to without asking for XXyour consent. X!FUNKY!STUFF! Xcd .. Xmkdir -i Xcd -i Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXUsing the -i option with the rm command will make the rm XXcommand prompt you before the file is removed. If you XXuse the -r option with the -i option, rm will prompt you XXbefore examining each directory. X!FUNKY!STUFF! Xcd .. Xmkdir -r Xcd -r Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXUsing the -r option with the rm command will delete all files XXin a directory as well as the directory itself. Be careful XXusing the -r option. X!FUNKY!STUFF! Xcd .. Xecho x - DIR Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR XX-f*force XX-i*inquire XX-r*recursively XX-f:-f XX-i:-i XX-r:-r X!FUNKY!STUFF! Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX Name XX XX rm - Remove File XX XX Use XX XX rm (option) filename XX XX Description XX XX Using the rm command you can remove unnecessary files from XX a directory. The command itself is easy to use, for XX example XX XX rm foo XX XX would remove the file foo from the directory you are in if XX you have write permission in the directory. XX With the right option you can remove all files in a XX directory that have certain attributes. For example XX XX rm *.c XX XX would remove all files that end in .c in the directory XX which you are in. XX XX XX XX X!FUNKY!STUFF! Xcd .. Xmkdir rmdir Xcd rmdir Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX XX XX XX Name XX XX rmdir XX XX Format XX XX rmdir directory-name XX XX Description XX XX The command rmdir removes directories by removing the XX links that connect the directories to the tree. A XX directory, however, must first be empty before it can be XX removed from the tree. Please consult the help facility XX for more information on the rm command. XX The following examples will show common use of the XX rmdir command. XX XX rmdir foo XX XX or XX XX rmdir foo/foo1 XX XX The first example will remove the directory called XX foo and the second will remove the subdirectory called XX foo1. XX XX X!FUNKY!STUFF! Xcd .. Xmkdir users Xcd users Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXWhen you type "users" at the command prompt, the computer will respond XXwith a list of users on the system and the computer that they are loged XXonto. For example: XX XX % users XX //magma: root XX //earth: XX //sand: XX //soil: XX //mud: XX //dirt: XX % XX X!FUNKY!STUFF! Xcd .. Xmkdir who Xcd who Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX"who(1)" is the command to find out who is logged on, when they XXlogged on, and onto which machine they logged on. XX XX % who XX sue magma ttym0 Sep 24 11:08 XX bob earth ttym0 Sep 24 11:37 XX root magma ttym6 Sep 24 11:13 XX % X!FUNKY!STUFF! Xcd .. Xmkdir write Xcd write Xecho x - DIR Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > DIR XXusers*finding someone to talk to XXusers:users XXwho*check for locked up XXwho:who X!FUNKY!STUFF! Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XX"write(1)" is a command to allow two simultaneously logged on users XXto communicate directly from their terminals (without having to "mail(1)" XXthings back and forth). This facility is of great use between team XXmembers for talking over ideas. However, it can get abusive. XX XXA short example is in order... XX XX % write root <------ This happens at bobs terminal XX XX <while at "root"'s terminal, the following message INTERRUPTS XX whatever was currently on the screen> XX XX <bel><bel> Message from bob on magma ttym0... Thu Sept 24 11:48:15 1987 XX XX <at this point, "root" must get out of whatever facility, job, vi XX session, etc. to get back to a shell prompt to answer the write.> XX XX $ write bob <------ Note the reverse of users XX XX <back at "bob"'s terminal, a similar message is displayed> XX XX <bel><bel>Message from root on dirt ttym6... Thu Sept 24 11:52:15 1987 XX XXAt this point, both parties can type messages to each other's screen. XXIt is suggested that you follow some sort of protocol so that you don't XXinterrupt each other's typing. I.E.... XX XX <after having received a message that "root" was online, bob XX SHOULD type first as the first party to interrupt> XX XX Hi there root. What's up? XX cts <------ Note this stands for XX clear to send XX <"root" now can type back to "bob"> XX XX Not too much... XX cts <------ "root" is saying it XX is ok for "bob" to XX write now. XX XXAt the end of the conversation, both parties must type <control-D> XXto exit this facility. That is the "end of file" character for XENIX X!FUNKY!STUFF! Xmkdir users Xcd users Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXThe "users(L)" command is one way to find out which users XXare logged on were. This can be used with "write" to have XXa conversation. X!FUNKY!STUFF! Xcd .. Xmkdir who Xcd who Xecho x - TEXT Xsed '1,$s/^X//' <<\!FUNKY!STUFF! > TEXT XXThe "who(1)" command is used to find out when a person logged on. XX XXIF A PERSON HAS BEEN LOGGED ON FOR MORE THAN ONE DAY, DO NOT "write(1)" XXTO THAT PERSON! X!FUNKY!STUFF! Xcd .. Xcd .. !FUNKY!STUFF!