Revision #5 : October 18, 1995, glen
Revision #4 : April 19, 1994, Danh
Revision #3 : Sept 14 1993, Eric
Revision #2 : July 19 1993, Grant
Revision #1 : July 9 1993, Eric

------------------------------------------------------------------------------


                   QNX Update System Command Reference
                -----------------------------------------
                [Copyright QNX Software Systems Ltd 1993,1994,1995]

This document describes some of the commands available under the "/bin" and 
"/usr/bin" directories for use by users of the QNX Update System from the
shell prompt. The first part of this file contains brief descriptions of the
commands and what they do, while more complete descriptions of each command
follow.

These commands will be used mostly by those people wishing to obtain some of
the QNX freeware and QNX product software updates. Users interested in the
conferencing system and/or technical support forum will want to direct their
attention to the "quics" command reference which explains some of the
conferencing system commands, and to the "ml" command reference which
describes how to enter the mail system.  Note that the shell most users use
while on quics is 'resh', a restricted shell, and not the ksh that QNX users
typically use on a local installation.

NOTE: Usage for most commands may be obtained by typing 'use <cmdname>'
      where <cmdname> is the name of the command you wish to run (e.g.  'use
      cp'). Commands in QNX 4 are generally found in the "/bin" and "/usr/bin"
      directories. Therefore, to see what commands are available you can
      execute 'ls /bin /usr/bin'.

      For the most part, the long form descriptions for the utilities found in
      this reference are just a compilation of these usage messages with a
      brief description of the command itself.

A NOTE ON ARCHIVE FORMATS:

Many programs or packages (including product updates) are stored in
a pax (tar) format, which is then 'frozen' (using the freeze utility)
to compress it. These files will have names which have suffixes like
'.tar', '.pax', '.tar.F' or '.pax.F' (the ones without the trailing
.F are merely paxed and not frozen). To extract these files:

Unarchive a .tar or .pax file:
 
   pax -r <filename

Melt and unarchive a .tar.F or .pax.F file:

   melt <filename | pax -r

The pax and melt programs are part of QNX 4 and are not available
for QNX 2.

You will also find that many of the files located in /usr/free are stored
in .tar.gz or .tgz files - these files are gzip'd (GNU zip) tar files and
can be extracted with `gzcat filename | pax -r'.  A ported copy of gzip
may be found in /usr/free/archivers.. gzip should be linked to gunzip and
gzcat.

------------------------------------------------------------------------------
Command             Description
------------------------------------------------------------------------------

batch               : Assemble a group of files for a batch download to
                      your system (it is easier to pick files for download
                      first and then download in a batch than it is to
                      pick a single file, download it, pick another file
                      etc). Batch takes command line arguments to add to
                      a batch, remove from a batch, list the batch, 
                      download the batch, etc.

bug                 : Report what you beleive to be a bug in QSSL distributed
                      software.

cat                 : Concatenate the files named on the command line to
                      standard output.

cd                  : Change directory. (Shell builtin)

cksum               : Generate and display to standard output the checksum
                      for each file named on the command line. Useful for
                      checking that a download was not corrupted (do a 
                      checksum on your local system - it should provide
                      an identical number).

cp                  : Copy files.

cut                 : Cut vertical fields from a file and write results
                      to standard output. Fields may be defined by
                      character position or by field number (based on
                      a field delimiter character).
                   
download            : Download specific file(s) to your system, using the
                      transfer protocol selected in your profile (see 
                      'profile'). If no transfer protocol is specified in 
                      your profile, the qcp protocol will be used.

echo                : Echo parameters supplied on the command line to 
                      standard output.

elm                 : A mail user agent.  Simply type elm and once inside
                      check out the online help.  It's quite comprehensive.
                      NOTE: You cannot send mail offsite using quics.qnx.com

find                : Walk a directory tree looking for files which match
                      the provided description (and possibly act on each one).
                      See the full usage for more detail. A tutorial on find 
                      is available for browsing or download
                      (usr/free/expl/utilities/find_tut).

finger              : Display information about a user including a .plan

grep                : Show text which matches the specified pattern, for
                      each file named on the command line or for standard
                      input if no files are named.

id                  : Show the userid/groupid associated with a username, or
                      your own if no username is supplied on the command line.

help                : Used to obtain help on a topic. If no topic is specified,
                      this helpfile will be shown. A list of topics may be
                      obtained by using 'help -?'.

infocmp             : Report capabilities of the named terminal type (or current
                      terminal type if none is named).

jove                : EMACS-style editor.

less                : 'More'-like paginator - good for browsing ASCII files.

login               : Log into the system.

logout              : Log out of the system (hangup).

ls                  : List files.

more                : Paginator - stops after each page of input to
                      allow you to read it without it scrolling off
                      the screen. (See 'less'.)

mv                  : Rename a file.

passwd              : change your password

profile             : This utility allows you to create/modify your user
                      profile which includes service plans associated with
                      your company, editor preferences, terminal type, 
                      screen size and preferred file transfer protocol.
                      Your profile will be preserved between calls.

pr                  : format the file(s) named on the command line for
                      printing and write to standard output.

ps                  : show the processes currently running on the QUICS
                      system

pwd                 : print your current working directory.

qcp                 : Upload/Download file(s). QCP is the QNX proprietary
                      file transfer protocol available on every QNX system.
                      Normally invoked by other utilities such as 'upload', 
                      'download' and 'batch'. (See also 'rb, rx, rz, sb, 
                      sx, sz.)

qed                 : Old-style QNX full-screen editor. Standard for QNX 2
                      and available from the update system for QNX 4.

rb                  : YMODEM receive (see rx, rz, qcp; also sb, sx, sz)

rm                  : Remove the files named on the command line.

rx                  : XMODEM receive (see rb, rz, qcp; also sb, sx, sz)

rz                  : ZMODEM receive (see rb, rx, qcp; also rb, sx, sz)

shres               : Look at the resume of quics user(s) - see `finger'

termdef             : Set terminal type. Normally invoked by tinit, modem,
                      etc. Uses at the command line include querying terminal
                      type ('termdef -'), resetting terminal emulation
                      ('termdef -es'), sending initialization sequences for
                      a new terminal type ('termdef -s' - you will have to
                      manually export TERM=terminaltype). Terminal type
                      is usually set by entering your terminal type in
                      your profile (see 'profile') which will remember your
                      terminal type for the next time you call. This command
                      is generally not run directly by the user, it is in
                      this environment so that it's available during the
                      login process.

tin                 : Please see /usr/quics/doc/tin - this is a newsreader
                      which should be used to access to conferencing portion
                      of QUICS.

touch               : Update the time of a file to the current date/time (or
                      to the date/time specified).

upload              : Upload files from your system to the update system.
                      'upload' will invoke the receive file transfer
                      protocol selected in your profile (see 'profile').
                      If no transfer protocol is specified in your profile,
                      the qcp protocol will be used.

use                 : Show a 'usage message' associated with a program.
                      This is normally enough of a manual to make use of
                      a program if you don't have printed documentation.
                      This command replaces the QNX2 "program ?" to get
                      a usage message.

vedit               : Full-screen editor shipped standard with QNX 4 systems.

vi                  : Full-screen editor similar to the Unix 'vi'.

view                : File viewer which utilizes the 'less' utility. Can be
                      used to view QNX 2 or QNX 4 ascii files.

which               : Show the path an executable would be fetched from
                      were you to run it.

who                 : Show the users currently online.

xargs               : Constructs argument lists from lines read in standard
                      input and invokes the program named on the command line
                      with those arguments. This is repeated until standard
                      input is exhausted. (Often used in conjunction with
                      'find'.)

==============================================================================
BATCH                                  GATHER FILENAMES FOR A BATCH DOWNLOAD

Syntax:

 batch command

Commands:

 add    file...      Add file(s) to the download list.
 delete file...      Delete file(s) from the download list.
 rm
 newer               Select files under /updates since last update downloaded.
 date   <date_spec>  Select all files under /updates since specified date.
                     <date_spec> is in the format [[CC][YY]MMDDhhmm[.SS]
 list                List files currently selected for the batch download.
 clear               Clear current list of files (remove all files from list).
 download            Download files that have been selected.

Description:

Batch allows you to assemble a group of files for a  batch  download  to  your
system  (it  is easier to pick files for download first and then download in a
batch than it is to pick a single file, download it, pick another  file  etc).
Batch  takes  command  line  arguments to add to a batch, remove from a batch,
list the batch, download the batch, etc. Each time you log in  to  the  update
system your batch list will start off empty.

Note that when using the 'add' option to 'batch', if the file specified is a
directory, all files and subdirectories under it will be registered for
download.

Also note that when removing files you should specify the whole path; if you
are not sure of the complete pathname but know the basename portion (say it 
was 'modem' you could do: 'batch list | grep modem' to obtain the complete
path as entered in the list).

Examples:

  Add the file '4.10-4.11.tar.F' to the batch download:

     batch add 4.10-4.11.tar.F

  Remove the file '/updates/qnx41/bin/modem' from the batch download:

     batch rm /updates/qnx41/bin/modem

  Add all updates for purchased products since you last updated to
  the batch download:

     batch newer

  List the files that are in the list for batch download:

     batch list

  Clear all the files out of the list for download:
   
     batch clear

  Download all the files in the list to your system:
 
     batch download

Files:

The batch command stores its file list in $HOME/batch.filelist.


==============================================================================
BUG                                                     REPORT A BUG TO QSSL

Syntax:

 bug

Description:

The  bug  utility will ask you a series of questions and then allow you to
give a full description of a bug or problem you have found with a QSSL
distributed product.

==============================================================================
CAT                                      CONCATENATE AND PRINT FILES (POSIX)

Syntax:

 cat [-cu] [file...]

Options:
 -c      Compress (fold) multiple newlines into 1.
 -u      Unbuffered, for interactive use.

Description:

The  cat  utility reads files in the order you specify and writes the contents
of these files to standard output. If a filename of - (dash) is specified, cat
will read from standard input at that point in the sequence. If no  files  are
specified, cat will read from standard input until EOF is encountered.

See also: less, more, pr


==============================================================================
CD                                           CHANGE WORKING DIRECTORY (POSIX)

Syntax:

 cd [directory]

Where:

 directory     is the pathname of the directory that will become the new
               working directory.

Examples:

 cd             change directory to the $HOME directory
 cd ..          change directory to the next highest directory in the
                directory structure
 cd /           change to the root directory
 cd /usr/free   change to the /usr/free directory
 cd ../..       change to the directory two levels above the current
                working directory
 cd ../../mine  change to the directory twho levels above the current
                working directory, then to the mine directory below it.

Description:

The cd command is a shell  built-in  that  changes  the  current  or  'working
directory' of the invoking process to the directory named as its argument. All
filenames that don't start with a slash (/) are assumed to be relative to your
current working directory.

The comamnd:

 cd

with no arguments changes the current working directory to your HOME directory
(which is set when you login). This is equivalent to:

 cd $HOME

if the  HOME  environment variable is set. If the HOME environment variable is
not defined, or has the null string as its value,  then  the  current  working
directory is unchanged.

See also: pwd, ls


==============================================================================
CKSUM                         DISPLAY FILE CHECKSUMS AND BLOCK COUNTS (POSIX)

Syntax:

 cksum [file...]

Options:
  -12    Use the algorithm from Posix Draft 12 (will become
         the default at some point in the future).
  -9     Use the algorithm from Posix Draft 9 (deprecated)

Where:
  file   is the pathname of a file to be checked. If no file is specified,
         cksum will read from standard input until EOF is encountered.

Description:

Cksum  generates  and  displays  to standard output the checksum for each file
named on the command line. This is useful for checking that a download was not
corrupted (do a cksum on your local system - it  should  return  an  identical
number).


==============================================================================
CP                                                         COPY FILES (POSIX)

Syntax:

 cp [options]... source_file target_file
 cp [options]... source_file... target_dir

Options:
 -a/-b date/time   Copy only files dated after/before date/time.
 -B                Use a very small (2k) copy buffer.
 -c                Create any directories neccessary to open dest path.
 -d                Distribute to multiple dests. e.g. cp -R /hd to /hd1 /hd2
 -D                Descend past device boundaries.
 -f                Force unlink of destination.
 -g grp[,grp]...   Copy only files belonging to these groups.
 -i                Interactive
 -l n              When -R specified, recurse only n levels. -l0 defeats -R
 -L                Attempt to preserve links.
 -m mode[,mode]... Copy only files with these modes (perms).
 -n                Copy only if src is newer than dst or dst doesn't exist.
 -O                Optimize - run cp on the cpu of destination node, do
                   whatever makes sense to speed up the operation.
 -p                Duplicate ownership (root only), permissions & file dates.
 -P pat[,pat]...   Copy only files matching these patterns.
 -R                Recursive copy of directories, attempting to
                   preserve the type of special files. On QNX, the attempt
                   to create block special files and character special files
                   will fail.
 -r                Recursive copy of directories, treating special files
                   the same as regular files (i.e. copy their contents to
                   a regular destination file).
 -s                Safe - skip over any destination files that don't have
                   write permission w/o prompting.
 -t                Inhibit duplication of file time (and mode when
                   the destination file already exists).
 -u ownr[,ownr]... Copy only files belonging to these owners.
 -v | -V           Verbose. -V is extra verbose.
 -x/-X             Copy only if destination file does/doesn't already exist.

Where:
 Date/time format is "[UTC] day/month/yr hr:min:sec", 24 hr clock.
 Mode format is [!]<octal num> or <[!][augo]=[rwxs]>[,...]
 (Similar to the form used in the chmod utility.)

Description:

 First syntax form:

   cp [options] source_file target_file

 The cp utility copies the contents of the source file to the destination file
 named by  target_file. This first syntax form is assumed when the destination
 file isn't an existing directory, and there is only one source file.

 Second syntax form:

   cp [options] source_file(s).. target_directory

 For  each  source_file,  cp  copies the contents of the file to a destination
 file in the existing directory named by target_directory.  The  destination's
 filename  under  the  target  directory will be the same as its basename (the
 basename is the final path component following the last slash). 

 Recursive Copying:

 When doing a recursive copy of a directory (-R or  -r  is  being  used),  the
 destination must  be  a  directory.    The cp utility will copy the files and
 directories underneath the source directory to the destination directory. The
 source directory  itself  will  NOT  be  duplicated  within  the  destination
 directory. Note  in  particular  that  when  naming  both  regular  files and
 directories as source files on the command line at the same  time,  that  the
 regular  files  and the _contents_ of the directories will appear immediately
 under the destination directory. This is  what  will  happen  if  you  'cp  *
 directory'  when  both  regular  files  and directories exist in your current
 directory. Watch for it.

Note: 
 Permissions and  file  dates  are preserved by default.  Either exporting the
 POSIX_STRICT environment variable or using the -t option will override this.


==============================================================================
CUT                    CUT OUT SELECTED FIELDS OF EACH LINE OF A FILE (POSIX)

Syntax:

 cut -c list [file ...]
 cut -f list [-d delim] [-s] [file ...]

Options:
 -c      Cut out the <list> of fields based on character position.
 -f      Cut out the <list> of fields based on field position.
 -d      Specify the field delimiter character.
 -s      Suppress the output of lines which contain no field delimiter.

Where:
 list    Is a list of character or field positions separated by a <space>
         or a <comma>. A range of positions may be specified using the
         <hyphen>.

Examples:

 cut -c 20-29,40-49 myfile    Output character columns 20 to 29 and 40 to 49 
                              of the file 'myfile'

 cut -f 3,5,7-11 -d'|' myfile   Output fields numbered 3, 5, and 7 to 11 of the
                              file 'myfile'.  The fields in each input line
                              are separated by the '|' character.

Description:

For  every file you name, the cut utility cuts out columns or fields from each
line, concatenates them, and writes the resulting line to the standard output.
If no files are specified, cut will read from standard input util  end-of-file
is reached.


==============================================================================
DOWNLOAD                             DOWNLOAD FILE(S) TO YOUR SYSTEM (UPDATE)                   

Syntax:

 download file...

Description:

The download utility will download the specified file(s) to your system, using
the transfer protocol selected in your  profile  (see  'profile').    If  no  
transfer protocol is specified in your profile, the qcp protocol will be used.


==============================================================================
ECHO                               WRITE ARGUMENTS TO STANDARD OUTPUT (POSIX)

Syntax:

 echo [string...]

Where:

 string is the string to be echoed to standard output.

Note:
   The following backslash sequences are processed within strings:

   \0nnn   nnn is an octal representation of a character
   \a      Bell (alert)
   \b      Backspace
   \c      End Of String with no newline
   \f      Form Feed
   \n      Newline
   \r      Carriage Return
   \t      Horizontal Tab
   \v      Vertical Tab
   \\      A real backslash

Description:

The echo utility writes its arguments, folled by a <newline> character, 
to standard output. If there are no arguments, only the <newline> 
character is written.


==============================================================================
FIND                                                       FIND FILES (POSIX)

find - find files (POSIX)

Syntax:

 find <path>... [operand_expression]

Description:

The  find  utility  recursively descends the directory heirarchy for each file
specified by path and seeks files that match operand_expression.  The  operand
expression  allows  an  action  to be performed on each file, or the output of
find can be piped to the xargs utility. The 'ws' utility  provided  a  similar
(but more limited) functionality under QNX 2.

A tutorial on find is available on the update system:

 /usr/free/expl/utilities/find_tut.

Operand expressions:

                      -primary_expression
                    (  operand_expression  )
                    !  operand_expression                  (not)
           operand_expression [-a] operand_expression      (and)
           operand_expression  -o  operand_expression      (or)

Primary expressions:

 -abort                   Causes termination of find with non-zero exit status.
 -atime <n>               True when file access time is between (n-1)*24 and
                          n*24 hours ago.
 -ctime <n>               True when file status last changed between (n-1)*24
                          and n*24 hours ago.
 -depth                   Causes files which are directories to be evaluated
                          AFTER they are recursed into, rather than before.
                          Always true. (See Note)
 -echo [text]... ;        Will write to standard output the text supplied.
                          {}s will be interpreted as per the -exec primitive to
                          represent the filename being evaluated.
 -errmsg [text]... ;      Similar to -echo except the output is written to
                          standard error.
 -error                   Sets a flag which will cause find to exit with non-
                          zero status when the find is finished. Always 
                          evaluates to false.
 -exec <cmd> [args]... ;  True when exit status of <cmd> is 0.
 -extents <n>             True if the file has n extents.
 -ftime <n>               True when file creation time is between n*24 and
                          (n-1)*24 hours ago.
 -group <groupname>       True when the file's group is <groupname>.
 -inode <file>|<n>        True if the file serial # matches that of <file>.
                          (Used to find links to <file>)
 -level <n>               True if the current level of directory nesting of
                          the file is <n>. Files/dirs supplied on the cmd line
                          to find are level 0.
 -links <n>               True when the file has <n> links.
 -logical                 Treat symbolic links as being the type of the file
                          they point to. If the link points to a directory,
                          recurse into that directory. (By default symbolic
                          links are treated as special files of type symbolic
                          link. What they point _to_ is irrelevant to find's
                          default behaviour.) Always true. (See Note)
 -ls                      Always true. Filename output to stdout in ls -l form.
 -mountdev                True if the file is a block special file for which
                          there is a filesystem mount point. (i.e. device 
                          contains a mounted QNX filesystem)
 -mountpoint              True if the file is a directory which is the mount
                          point for a QNX filesystem.
 -mtime <n>               True when file modification time is between (n-1)*24
                          and n*24 hours ago.
 -name <pattern>          True for any file whose basename matches <pattern>
 -newer <file>            True if file being evaluated is newer than <file>.
 -nouser                  True when the file's owner is not in the passwd file
 -nogroup                 True when the file's group does not exist
 -ok <cmd> [args]... ;    True when exit status of <cmd> is 0. False when 
                          user says no to the prompt.
 -perm [-]<mode>          True when the file perms exactly match those defined
                          by <mode>. When a dash (-) precedes the mode, -perm
                          will evaluate to true when the file perms contain
                          at least those specified by <mode>. The mode is
                          expected to be in standard chmod format.
 -pname <pattern>         True for any file whose path (as would be printed
                          by -print), matches <pattern>.
 -print                   Always true. Outputs filename to stdout.
 -prune                   Always true. Do not descend into the current file
                          if it is a directory. If -depth is used, -prune has
                          no effect. Note that since find processes dirs before
                          descending into them (unless -depth is used), -prune
                          as the first thing in the expression will prevent
                          any directories supplied on the cmd line from being
                          descended into.
 -size <n>[c]             True when the file is <n> blocks in size. (or chars
                          in size when c is appended to the number.
 -spawn <cmd> [args]... ; Similar to -exec but command is not run through a
                          shell.
 -type {b|c|d|p|f|l|n|s}  True when file is Block special, Char special, Dir,
                          Pipe, regular File, symbolic Link, special Named
                          file, or Socket.
 -user <username>         True when the file is owned by <username>.
 -xdev                    Causes find to skip directories which are on 
                          different devices. Always true. (See Note)

Note:
A  {} in the command arguments of -exec, -spawn, -ok, -echo or -errmsg will be
replaced by the pathname being evaluated. There are extensions to this  syntax
for stripping leading and trailing characters. Please refer to the manual.

The  -depth,  -logical  and  -xdev  primitives always evaluate to TRUE for the
purposes of  evaluating  the  expression.    These  primitives  affect  find's
behaviour globally  no  matter where they occur on the command line. Find acts
on these when it parses its command line, not when it evaluates them  as  part
of the expression.


==============================================================================
GREP                                       SEARCH FOR STRING PATTERNS (POSIX)


Syntax:

 grep [-E|-F] [-chilnqsvx] [-e pattern | -f pattern_file]... [file ...]
 grep [-E|-F] [-chilnqsvx] pattern [file ...]

Options:

 -E            Use Extended Regular Expressions.
 -F            Use Fixed Strings.
 -c            Only print count of selected lines.
 -i            Ignore upper-case/lower-case distinctions.
 -h            Do not display filenames.
 -l            Print pathname once.
 -n            Precede each output line with the line number.
 -q            Produce no ouput.
 -s            Suppress error messages on file open errors.
 -v            Select lines not matching specified patterns.
 -x            Match pattern(s) exactly.
 -e pattern    Specify a search pattern.
 -f pat_file   Specify a file of search patterns.

Examples:

 Display lines in Phone.List containing telephone numbers:

     grep '[[:digit:]]\{3\}-[[:digit:]]\{4\}' Phone.List

 Display all the people who logged in who are listed in the MyFriends file:

     who | grep -F -f MyFriends

 Display all occurrences of the words "steve" and "barney" in the Phone.List
 file:

     grep -F -e steve -e barney Phone.List

 Display all occurrances of the string "_disable" in any of the files in
 /usr/include/*.h or /usr/include/sys/*.h :

     grep -F _disable /usr/include/*.h /usr/include/sys/*.h

Description:

The  grep  utility  searches  input for line matching the expression(s) given.
When an input  line  matches  any  of  the  expressions,  it  is  said  to  be
"selected". By default, selected lines are written to standard output.

There are three  types  of  expressions  understood  by  grep:  Basic  Regular
Expressions, Extended  Regular Expressions, and Fixed Regular Expressions.  If
you don't specify -E or -F, the expression(s) are taken to  be  Basic  Regular
Expressions.

Basic  and  Extended Regular expressions are similar to arithmetic expressions
in that larger expressions are formed by  combining  smaller  expressions  and
operators according to some precedence rule.

Regular expressions have an  "invisible"  operator,  i.e.  concatenation.  The
concatenation of two expressions means match the one on the left, then the one
on the right.

The smallest expression is a single character.

Basic Regular Expressions:

The  following  table  summarizes  the  Basic  Regular  Expressions,  and  the
precedence of the operators:

\(expression\)         subexpression. Match the pattern expression.
                       Used for backreferences (see below) and precedence.

\N                     back-reference. Match the exact string that the Nth
                       subexpression did.

.                      (dot) match any single character

[charset]              match any member of the set charset (see below).

c                      match any non-special character 

expression*            match any nuymber of repetitions of expression,
                       including zero.

expression\{M\}        match exactly M repetitions of expression.

expression\{,N\}       match zero to N repetitions of expression.

expression\{M,N\}      match M to N repetitions of expression.

expr0expr1             (concatenation) match expr0 then expr1

^expression            match expression only at beginning of line

expression$            match expression only at end of line


A charset is formed by concatenation of the following operators:

c                      any character c
c-d                    any character in the range from c to d
[:alpha:]              any alphabetic character
[:upper:]              any uppercase character
[:lower:]              any lowercase character
[:digit:]              any numeric character
[:alnum:]              any numeric or alphabetic character
[:xdigit:]             any character user to represent a hexadecimal
                       number (0-9, a-f and A-F)
[:space:]              any character that is whitespace
[:print:]              any printable character
[:punct:]              any character that is punctuation
[:graph:]              any character with a graphic representation
[:cntrl:]              any character used for control
[=a=]                  an equivalence class a
[.a.]                  the collating element a

If the charset begins with the caret (^) the set is inverted. For
example:
 
  [^[:alpha:]]

means match any non-alphabetic character.

Extended Regular Expressions:

The  Extended  Regular  Expressions  are an enriched set of regular expression
operators. In particular, the Extended Regular Expressions support an operator
for alternation, thus allowing a match of one expression or another.    It  is
also  important  to  note  that the parentheses syntax is different from Basic
Regular Expressions, and the semantics are subtly different.    There  are  no
back-references is Extended Regular Expressions.

The following list summarizes the Extended Regular Expressions:

(expression)           match expression; useful for altering precedence.

.                      (dot) match any single character

c                      match any non-special character 

[charset]              match any member of the set charset (see below).

expression*            match any nuymber of repetitions of expression,
                       including zero.

expression+            match 1 to any number of repetitions of expression

expression?            expression is optional (match 0 or 1 repetition)

expression\{M\}        match exactly M repetitions of expression.

expression\{,N\}       match zero to N repetitions of expression.

expression\{M,N\}      match M to N repetitions of expression.

expr0expr1             (concatenation) match expr0 then expr1

expr0|expr1            (alternation) match expr0 _or_ expr1 (not both)

^expression            match expression only at beginning of line

expression$            match expression only at end of line


Fixed Regular Expressions:

Fixed Regular  Expressions  consist of a set of strings of characters. They do
not permit the operators of Extended or  Basic  Regular  Expressions.    The  
algorithm  used  is  extremely  efficient for locating one of a set of strings
within another string. Thus, if you don't need the various operators of  Basic
or Extended Regular Expressions, the Fixed Expressions are a better choice.


==============================================================================
ID                                                     RETURN USER ID (POSIX)

Syntax:

 id [user]
 id -G [-n] [user]
 id -g [-nr] [user]
 id -u [-nr] [user]

Options:

 -G       Output all different group IDs (effective and real)
          only, as unsigned integers one per line.
 -g       Output only the effective group ID, as an unsigned integer.
 -n       Output the ids in their character string form instead of
          unsigned integers.
 -r       Output the real ID instead of the effective ID.
 -u       Output only the effective user ID, as an unsigned integer.

Description:

The id utility will show the userid/groupid associated  with  a  username,  or
your own if no username is supplied on the command line.


==============================================================================
HELP                           OBTAIN HELP ON UPDATE SYSTEM COMMANDS (UPDATE)

Syntax:

 help <topic>

Description:

The help  command is used to obtain help on a topic. If no topic is specified,
this helpfile will be shown. A list of topics may be obtained by  using  'help
-?'.

A list of topics can be found in /usr/lib/quics/help, or by entering "help -?".
If no topic is specified, general system help is given.

See also: use


==============================================================================
INFOCMP              OUTPUT THE CONTENTS OF A TERMINFO CAPABILITY FILE (UNIX)

Syntax:

 infocmp [-1CILQ] [-w width] [terminal_name]

Options:

 -1             One column report.
 -C             Use termcap capability names.
 -I             Use terminfo capability names.
 -L             Long capability names.
 -Q             QNX-specific long capability names.
 -w width       Set the report width.

Where:

 terminal_name  is the name of the terminal to check

Description:

The infocmp utility reports  capabilities  of  the  named  terminal  type  (or
current terminal type if none is named).


==============================================================================
JOVE                                                  EMACS-STYLE EDITOR (PD)

NAME
     jove - an interactive display-oriented text editor

SYNOPSIS
     jove [-d directory] [-w] [-t tag] [+[n] file] [-p file] [files]
     jove -r

DESCRIPTION
     JOVE is Jonathan's Own Version of Emacs.  It is based on the
     original  EMACS  editor  written at MIT by Richard Stallman.
     Although JOVE is meant to be compatible  with  EMACS,  there
     are  some  major differences between the two editors and you
     shouldn't rely on their behaving identically.

     JOVE works  on  any  reasonable  display  terminal  that  is
     described  in  the  termcap  file  (see  TERMCAP(5) for more
     details).  When you start up JOVE, it checks to see  whether
     you  have  your  TERM  environment  variable  set.   On most
     systems that will automatically be set up for  you,  but  if
     it's  not  JOVE  will  ask you what kind of terminal you are
     using.  To avoid having to type this every time you run JOVE
     you  can  set  your TERM environment variable yourself.  How
     you do this depends on which shell you are running.  If  you
     are running the C Shell, as most of you are, you type

          % setenv TERM type

     and with the Bourne Shell, you type

          $ TERM= type ; export TERM

     where type is the name of the kind of terminal you are using
     (e.g.,  vt100).   If  neither of these works get somebody to
     help you.

INVOKING JOVE
     If you run JOVE with no arguments you will be placed  in  an
     empty  buffer,  called  Main.  Otherwise,  any arguments you
     supply are considered file names and each is "given" its own
     buffer.   Only  the  first file is actually read in--reading
     other files is deferred until you actually try  to  use  the
     buffers  they  are  attached  to.   This is for efficiency's
     sake: most of the time, when you run JOVE on a big  list  of
     files, you end up editing only a few of them.

     The names of all of the files specified on the command  line
     are  saved in a buffer, called *minibuf*. The mini-buffer is
     a special JOVE buffer that is used when  JOVE  is  prompting
     for  some  input to many commands (for example, when JOVE is
     prompting for a file name).  When you are being prompted for
     a  file name, you can type C-N (that's Control-N) and C-P to
     cycle through the list of files that were specified  on  the
     command  line.  The file name will be inserted where you are
     typing and then you can edit  it  as  if  you  typed  it  in
     yourself.

     JOVE recognizes the following switches:

     -d   The following argument is taken to be the name  of  the
          current directory.  This is for systems that don't have
          a version of C shell that automatically  maintains  the
          CWD  environment variable.  If -d is not specified on a
          system without a modified C shell, JOVE  will  have  to
          figure  out  the current directory itself, and that can
          be VERY slow.  You can simulate the modified C shell by
          putting   the   following   lines   in   your  C  shell
          initialization file (.cshrc):

               alias cd        'cd \!*; setenv CWD $cwd'
               alias popd      'popd \!*; setenv CWD $cwd'
               alias pushd     'pushd \!*; setenv CWD $cwd'

     +n   Reads the file, designated by the  following  argument,
          and  positions  point  at  the n'th line instead of the
          (default) 1'st line.  This can be specified  more  than
          once  but  it doesn't make sense to use it twice on the
          same file; in that case the  second  one  wins.  If  no
          numeric  argument  is  given  after the +, the point is
          positioned at the end of the file.

     -p   Parses the error messages in the file designated by the
          following  argument.  The error messages are assumed to
          be in a format similar to the C compiler, LINT, or GREP
          output.

     -t   Runs the find-tag command on the string  of  characters
          immediately  following  the  -t  if there is one (as in
          -tTagname), or on the  following  argument  (as  in  -t
          Tagname) otherwise (see ctags(1)).

     -w   Divides the window in two.  When this  happens,  either
          the  same  file  is  displayed  in both windows, or the
          second file in the list is read in and displayed in its
          window.

RECOVERING BUFFERS AFTER A CRASH
     The -r option of jove runs the JOVE  recover  program.   Use
     this  when  the  system  crashes,  or  JOVE  crashes, or you
     accidently get logged out while in JOVE.  If there  are  any
     buffers to be recovered, this will find them.

     Recover looks for JOVE buffers that are left around and  are
     owned  by  you.  (You cannot recover other peoples' buffers,
     obviously.) If there were no buffers that were  modified  at
     the  time  of  the crash or there were but recover can't get
     its hands on them, you will be informed  with  the  message,
     "There  is  nothing  to recover."  Otherwise, recover prints
     the date and time of the version of the buffers it has,  and
     then waits for you type a command.

     To get a list of the buffers recover knows  about,  use  the
     list  command.  This will list all the buffers and the files
     and the number of lines associated with them.  Next to  each
     buffer  is a number.  When you want to recover a buffer, use
     the get command.  The syntax is get  buffer  filename  where
     buffer  is  either  the  buffer's  name or the number at the
     beginning of the line.  If you don't type the buffer name or
     the filename, recover will prompt you for them.

     If there are a lot of buffers and you want to recover all of
     them,  use  the  recover  command.   This  will recover each
     buffer to the name of the buffer with ".#" prepended to  the
     name (so that the original isn't over-written).  It asks for
     each file and if you want to restore  that  buffer  to  that
     name you type "yes".  If you want to recover the file but to
     a different name, just type the new name in.   If  you  type
     "no" recover will skip that file and go on to the next one.

     If you want to look at a buffer before deciding  to  recover
     it,  use  the  print  command.  The syntax for this is print
     buffer where buffer again is either its name or the  number.
     You  can  type  ^C if you want to abort printing the file to
     the terminal, and recover will respond with  an  appropriate
     message.

     When you're done and have all the buffers you want, type the
     quit  command to leave.  You will then be asked whether it's
     okay to delete the tmp files.  Most of the time that's  okay
     and  you should type "yes".  When you say that, JOVE removes
     all traces of those buffers and you won't be able to look at
     them  again.  (If you recovered some buffers they will still
     be around, so don't worry.)  So, if you're not sure  whether
     you've  gotten  all  the  buffers, you should answer "no" so
     that you'll be able to run recover again  at  a  later  time
     (presumably  after you've figured out which ones you want to
     save).

     If you type ^C at any time other than when you're printing a
     file  to the terminal, recover will exit without a word.  If
     you do this but wish you hadn't, just type "jove -r" to  the
     shell again, and you will be put back with no loss.

GETTING HELP
     Once in JOVE, there are several commands  available  to  get
     help.   To  execute  any  JOVE  command,  you  type "<ESC> X
     command-name" followed by <Return>.  To get a  list  of  all
     the  JOVE  commands you type "<ESC> X" followed by "?".  The
     describe-bindings  command  can  be  used  to  get  a   list
     containing  each  key,  and its associated command (that is,
     the command that gets executed when you type that key).   If
     you  want to save the list of bindings, you can set the jove
     variable  send-typeout-to-buffer  to  ON  (using   the   set
     command),  and  then  execute the describe-bindings command.
     This will create a buffer and put in it the bindings list it
     normally  would  have  printed  on the screen.  Then you can
     save that buffer to a file and print it to use  as  a  quick
     reference card.  (See VARIABLES below.)

     Once you know the name of a command, you can find  out  what
     it  does  with  the  describe-command command, which you can
     invoke quickly by typing "ESC ?".  The apropos command  will
     give you a list of all the command with a specific string in
     their names.  For example, if you want to know the names  of
     all  the  commands  that are concerned with windows, you can
     run "apropos" with the keyword window.

     If you're not familar with the EMACS command set,  it  would
     be  worth your while to use run TEACHJOVE.  Do do that, just
     type "teachjove" to your shell and you  will  be  placed  in
     JOVE   in  a  file  which  contains  directions.   I  highly
     recommend this for beginners; you may save yourself a lot of
     time and headaches.

KEY BINDINGS and VARIABLES
     You can alter the key bindings in JOVE to fit your  personal
     tastes.   That is, you can change what a key does every time
     you strike it.  For example, by default the C-N key is bound
     to  the  command  next-line and so when you type it you move
     down a line.  If you want to change a binding or add  a  new
     one,  you use the bind-to-key command.  The syntax is "bind-
     to-key <command> key".

     You can also change the way JOVE behaves in little  ways  by
     changing  the  value of some variables with the set command.
     The syntax is "set  <variable>  value",  where  value  is  a
     number  or  a  string,  or  "on"  or "off", depending on the
     context.  For example, if  you  want  JOVE  to  make  backup
     files, you set the "make-backup-files" variable to "on".  To
     see the value of a  variable,  use  the  "print  <variable>"
     command.

INITIALIZATION
     JOVE automatically reads  commands  from  an  initialization
     file in your HOME directory, called ".joverc".  In this file
     you can place commands that you would normally type in JOVE.
     If  you  like  to  rearrange  the  key bindings and set some
     variables every time you get into JOVE, you should put  them
     in  your  initialization  file.   Here  are a few lines from
     mine:
          set match-regular-expressions on
          auto-execute-command auto-fill /tmp/Re\|.*drft
          bind-to-key i-search-forward ^\
          bind-to-key i-search-reverse ^R
          bind-to-key find-tag-at-point ^[^T
          bind-to-key scroll-down ^C
          bind-to-key grow-window ^Xg
          bind-to-key shrink-window ^Xs
     (Note  that  the  Control  Characters  can  be  either   two
     character  sequences  (e.g.  ^  and C together as ^C) or the
     actual control character.  If you want to use an ^ by itself
     you  must  BackSlash  it (e.g., bind-to-key grow-window ^X\^
     binds grow-window to "^X^").

SOME MINOR DETAILS
     You should type C-\ instead of C-S in many  instances.   For
     example,  the  way  to  search for a string is documented as
     being "C-S" but in reality you should type "C-\".   This  is
     because  C-S  is the XOFF character (what gets sent when you
     type the NO SCROLL key), and clearly that won't  work.   The
     XON  character  is  "C-Q"  (what  gets sent when you type NO
     SCROLL again) which  is  documented  as  the  way  to  do  a
     quoted-insert.   The  alternate key for this is "C-^" (typed
     as "C-`" on vt100's and its look-alikes).  If  you  want  to
     enable  C-S and C-Q and you know what you are doing, you can
     put the line:
          set allow-^S-and-^Q on
     in your initialization file.

     If your terminal has a metakey, JOVE will use it if you turn
     on the "meta-key" variable.  JOVE will automatically turn on
     "meta-key" if the METAKEY environment variable exists.  This
     is  useful for if you have different terminals (e.g., one at
     home and one at work) and one has a metakey  and  the  other
     doesn't.

FILES
     LIBDIR/.joverc - system wide initialization file
     ~/.joverc - personal initialization file
     TMPDIR - where temporary files are stored
     LIBDIR/teach-jove - the interactive tutorial
     LIBDIR/portsrv - for running shells in windows (pdp11 only)

SEE ALSO
     teachjove(1) - for an interactive JOVE tutorial.

DIAGNOSTICS
     JOVE diagnostics are meant to be self-explanatory,  but  you
     are advised to seek help whenever you are confused.  You can
     easily lose a lot of work if you don't know EXACTLY what you
     are doing.

BUGS
     Lines can't be more than 1024 characters long.

     Searches can't cross line boundaries.

AUTHOR
     Jonathan Payne


==============================================================================
LESS                                             INTERACTIVE PAGINATOR (UNIX)

Syntax:

 less    [-[+]aBcCdeEfimMnNqQrsSuUw] [-b n] [-x n] [-[z] n] [-h n] [-j n]
         [-p pattern] [-y n] [-[oO] logfile] [-t tag] [-T tagsfile]
         [+cmd] [file ...]
Options:

 -a     Start searches after the last line displayed on the screen
 -b n   Use a nonstandard number of buffers (default 10)
 -B     Disable automatic allocation of buffers
 -c     Do full-screen redraws from the top line down
 -C     Clear the screen, then do full-screen redraws from the top line down
 -d     Suppress the error message normally displayed if the terminal is dumb
 -e     Automatically exit the second time end-of-file is reached
 -E     Automatically exit the first time end-of-file is reached
 -f     Force nonregular files to be opened
 -h n   Specify a maximum number of lines to scroll backward
 -i     Ignore case; uppercase and lowercase are considered identical
 -j n   Use this line on the screen to position "target" lines
 -m     Prompt verbosely (like more), with the percent into the file
 -M     Prompt even more verbosely than more
 -n     Suppresses line numbers
 -N     Display a line number at the beginning of each line
 -o f   Copy input to the named file as it is being viewed
 -O f   Copy input to the named file as it is being viewed (force overwrite)
 -p p   Start at the first occurrence of the pattern 'p' in the file
 -q     Be moderately quiet; only ring the terminal bell on errors
 -Q     Be totally quiet; never ring the terminal bell
 -r     Display "raw" control characters
 -s     Squeeze consecutive blank lines into a single blank line
 -S     Chop rather than fold lines longer than the screen width
 -t t   Edit the file containing the specified tag
 -T f   Use the specified tags file in place of the tags file
 -u     Treat backspaces and carriage returns as printable characters
 -U     Treat backspaces and carriage returns as control characters
 -w     Use blank lines to represent lines past the end ofthe file
 -x n   Set tab stops every n positions
 -y n   Specifies a maximum number of lines to scroll forward
 -[z] n Change the default scrolling window size to n lines

 +       Specify an initial command to less
 ++      Specify an initial command for every file viewed

Where:

 file    A pathname of an input file. If no file operands are specified,
         less uses the standard input.

Description:

The  less  utility  is  a  program  similar  to more, but less allows backward
movement in the file as well as forward movement. The less  utility  uses  the
system terminal capability database, so it can run on a variety of terminals. 

The  less  utility  will display a screen full of information, then prompt for
user input by displaying a : prompt at the bottom of the screen. Commands  can
then be entered from the keyboard.

See also: cat, more, pr


==============================================================================
LOGIN                                                           LOG IN (UNIX)

Syntax:

 login [-f user] [-p] [-t timeout] [username]

Where:

 -f user    Force login of user 
 -p         Preserve current environment variables. Default is to clear.
 -t timeout Cancel login if no response within 'timeout' seconds.
               0 disables timeout, default is 0.
 username  A users' login name.

Description:

The  login command is used when someone either first signs on to the computer,
or wishes to log in as another user. If login is invoked without an  argument,
it prompts  for  a  suername  and  password.  If invoked with an argument, the
argument is assumed to be the username.

The  login  command  verifies  the  username  and  password against a password
database and, if verified, starts the user session. If either the username  or
password  is  unacceptable,  login  prints  the  message "Login incorrect" and
terminates.

The  login  utility  may  be  executed  only  from the login shell, or when no
session is active. You can't nest login commands.

See also: logout, passwd


==============================================================================
LOGOUT                                             TERMINATE A SESSION (UNIX)

Syntax:

 logout 

Description:

The logout command terminates a QNX session. This command can be executed only
from  a  shell  invoked by a login command; otherwise a message is printed and
the logout command is ignored.

If  you  execute  a  login  command from the login shell, an implied logout is
performed.

See also: login


==============================================================================
LS                                            LIST DIRECTORY CONTENTS (POSIX)

Syntax:

 ls [-1CFRacdilqrstu] [-DSbfghnopvx] [file ...]

Options:

 -1    Force output to be one entry per line.
 -C    Multi column output.
 -D    List directories only.
 -F    Display '/' after directories, '*' after executables, '|' after FIFO's.
 -L    Indirect through symbolic links rather then showing them themselves.
 -R    Recursively list subdirectories encountered.
 -S    Don't sort the output.
 -a    List directory entries whose names begin with a period.
 -b    Use length of file for sorting or printing.
 -c    Use time of last modification for sorting or printing.
 -d    Do not treat directories differently than other file types.
 -f    Do not sort the output.
 -g    Like -l but don't show owner.
 -h    Display a header for 'l', 'n' and 'x' options.
 -i    Print serial number of file.
 -l    List in long format.
 -n    Same as '-l' except displays GID/UID numbers rather than names.
 -o    Like -l but don't show group.
 -p    Display relative pathnames (files only).
 -q    Display a '?' in place of non-printable chars (see LOCALE).
 -r    Sort in reverse order.
 -s    Display the number of file system bytes in units of 512.
 -t    Sort by time.
 -u    Use time of last access for sorting or printing.
 -v    List directories first.
 -x    Display file extent information.

Description:

For  each file you name that isn't a directory, ls displays the file's name as
well as any information requested on the file.

For  each  directory you name, ls displays the names of files contained within
that directory, as well as any information requested  on  the  files.  The  -d
option  overrides  this  behaviour  and  makes  ls  display information on the
directory itself, rather than on its contents.

If  you  specify more than one file, ls displays files that aren't directories
first. Directories and non-directories are sorted separately.

If  you  don't  specify  a  file,  ls  displays  the  contents  of the current
directory.

In  the  update  system's  environment, ls will normally be aliased to 'ls -L'
which will run through symbolic links rather than showing the links themselves
(this is particularly significant for symbolic links to directories).

When displaying a timestamp for a file, ls will display  the  date  and  time,
unless  the  file  is  older  or  newer than the current date by six months (a
"month" is defined as 30 days). Otherwise ls will display the date and year.

See also: cd, find, pwd


==============================================================================
MORE                            DISPLAY FILES ON A PAGE-BY-PAGE BASIS (POSIX)

Syntax:

 more      [-ceius] [-n lines] [-p pattern] [-t tag] [-x tabstop] [file ...]

Options:

 -c          Clear full screen between 'pages'
 -e          Stop after last line in file (if more than 1 page)
 -i          Ignore case during searches
 -u          Display backspaces as CONTROL characters
 -s          Squeeze multiple lines into one
 -n lines    An integer number of lines/screen
 -p pattern  Pattern to search for before first page display
 -t tag      Edit the file containing the specified tag
 -x tabstop  Change default tab stops

Where:

 file        Optional file name(s) (- means standard input)

Description:

The more  utility  lets  you  view  text  files  one screenfull at a time. The
utility determines the number of lines that make a full screen by  looking  in
the terminal  database. However, the LINES environment variable can be used to
override the value found in the database, and the -n option  can  be  used  to
override the LINES variable.

The more  utility  can  be  very  useful  when  another  utility  prints  more
information  to  the standard output than can be displayed on a single screen.
By piping the output to more, you can scroll through the displayed  output  of
leisure. For example:

  ls | more

pipes the output from the ls command to more,  allowing  you  to  examine  the
output without having it scroll off your screen before you can read it.

See also: cat, less, pr


==============================================================================
MV                                                          MOVE FILES (POSIX)


Syntax:

 mv  [-f|-i] [-V|-v] source_file target_file

 mv  [-f|-i] [-V|-v] source_file... target_dir

Options:

 -f       Force existing destinations to be removed before moving
          without prompting for confirmation.
 -i       Interactive. Write a prompt to stderr requesting confirmation
          for each move which would overwrite an existing file.
 -v | -V  Verbose. -V is extra verbose.

Description:

First syntax form:

 mv [-f | -i] source_file target_file

The  mv  utility  moves  the  file  named  by  the  source_file operand to the
destination specified by the target_file operand. This first  syntax  form  is
assumed when the final operand you specify doesn't name an existing directory.
Source_file may be a regular file, symbolic link, or directory.

Second syntax form:

 mv [-f | -i] source_file... target_directory

For each source_file, the mv utility moves the file to a destination  file  in
the directory  named  by  the  target_dir operand.  The destination's filename
under the target directory will be  the  same  as  its  basename  (final  path
component).

For example:

 mv dir/dir/myfile /existingdir

will move dir/dir/myfile to existingdir/myfile.

This  second  syntax  form  is  assumed  when  either the destination names an
existing directory, or when more than one source file is specified. It  is  an
error to specify more than one source file if the destination does not name an
already existing directory.

See also: cp, rm
 

==============================================================================
PASSWD                                          CHANGE LOGIN PASSWORD (POSIX)

Syntax:

 passwd [username ...]

Where:

 username     is either an existing user, to change their password
              or a new user to create an account for

Description:

The passwd utility allows a login password to be changed or a new username  to
be created.

If  you  are  changing  your password, passwd prompts for the old password and
then for the new password. The new password must be entered  twice,  to  avoid
typing mistakes. Only the user or root may change that user's password.

Only root may use passwd to create a new username.

See also: login


==============================================================================
PROFILE                        CHANGE THE UPDATE SYSTEM USER PROFILE (UPDATE)

Syntax:

 profile

Description:

The  profile  utility  allows  you  to  create/modify  your user profile which
includes service plans  associated  with  your  company,  editor  preferences,
terminal type, screen size and preferred file transfer protocol.

Profile is an interactive utility and accepts no command line parameters.

Your profile will be preserved between calls to the QNX update system.


==============================================================================
PR                                     PRINT FILES TO STANDARD OUTPUT (POSIX)

Syntax:

 pr [+nn] [-nn] [-a] [-d] [-e[char][gap]] [-f]
    [-h header] [-i[char][gap]] [-l lines] [-m]
    [-n[char][width]] [-o offset] [-r] [-s[char]] [-t]
    [-w width] [file....]

Options:

 +nn     Begin output at page number nn.
 -nn     Produce output nn columns wide.
 -a      Print multiple text-column across the page.
 -d      Produce double spaced output.
 -e      Expand input tabs to columns gap+1, 2*gap+1, etc.
         expand with [char] character or space (default).
 -f      Use <form_feed> character for new pages.
 -h      Use the string header as the header instead of file.
 -i      Reduce multiple spaces with tabs when they reach gap+1,
         2*gap+1, etc.  Reduce to [char] character or <tab> (default).
 -l      Override 66 line default and reset page length to lines.
 -m      Merge files.  Write 1 line from each file side by side.
 -n      Provide width-digit line numbering (default is 5).
 -o      Each line of output is preceeded by offset <spaces>.
 -r      Print no diagnostic reports on failure to open files.
 -s      Separate text columns by single char [char].
 -t      Do not print 5 line header or trailer.
 -w      Set the width of the line to width column positions.

Description:

The pr utility is a printing and pagination filter that prints  files  to  the
standard output.

By  default,  the  listing  is  separated  into pages, each with a header that
includes the page number, date, time, and the file's pathname. The  header  is
of the form:

  \n
  \n
  MMM DD HH:MM YYYY Page N \n
  \n
  \n

The trailer is simply the 5 <newline> characters required to  advance  to  the
next  top  of  form  (unless  -f  is used, in which case a <form-feed> will be
sent). Text columns  are  of  equal  width;  there  is  a  least  one  <blank>
separation character  between  text  columns. Lines that don't fit into a text
column are truncated.  If standard  output  is  associated  with  a  terminal,
diagnostic messages are suppressed until pr has completed processing.

See also: cat, less, more


==============================================================================
PS                                              REPORT PROCESS STATUS (POSIX)

Syntax:

 ps [-aAdlS] [-F format] [-g pgrps] [-n node] [-p pids] [-s sids]
    [-t ttys] [-u uids]

Options:

 -a  All processes associated with terminals except for process group leaders
 -A  All accessible processes
 -d  All processes except process group leaders
 -F  Print in format as specified by format string
 -g  Show only matching process groups
 -l  Print in long format
 -n  Show processes on specified node
 -p  Show only matching process numbers
 -s  Show only matching session numbers
 -S  Show only matching process states
 -t  Show only matching terminals
 -u  Show only matching users

Format specifiers:
 %  A literal '%' character
 u  Real user ID
 U  Effective user ID
 g  Real group ID
 G  Effective group ID
 p  Process ID
 P  Parent process ID
 r  Process group ID
 ps  Ratio of CPU time used to CPU time available
 z  Size of process in kilobytes
 n  Process' nice value
 N  Process' priority
 t  Elapsed wall clock time
 T  Relative start time
 x  Cumulative CPU time
 y  Controlling terminal
 c  Command name
 a  Command with arguments
 b  Process blocked on
 d  Current working directory
 e  Process environment
 f  Process flags
 s  Session ID
 S  Process state

Description:

The  ps  utility  prints  information  about  processes, subject to having the
appropriate privilege to obtain information about those processes.    With  no
options,  ps  prints  information  about processes associated with the current
terminal. The output  includes  the  process  ID,  terminal  name,  cumulative
execution time, and the command name of each process.

The options that use lists (-f, -p, -t, -u) can have the list 
specified in one of two forms:

- a list of identifiers separated by commas

- a list of identifiers enclosed in double quotes and separated by
  commas and one or more <space> characters, or a combination of
  commas and <space> characters.

A list must be a single command line argument.

The initial set of processes selected by -a, -A, or -d is intersected with the
processes selected by the -g, -p, -t or -u options, if any of the  latter  are
specified.


==============================================================================
PWD                                      PRINT WORKING DIRECTORY NAME (POSIX)

Syntax:

 pwd 

Description:

The pwd utility is a shell builtin that writes the  pathname  of  the  current
working directory to the standard output. The pwd utility is also available as
an exec-able utility (/bin/pwd).

See also: cd, ls


==============================================================================
QCP                                         QNX COMMUNICATIONS PROTOCOL (QNX)

Syntax:

 Send files:

  qcp [device] SEnd [options]* src_file[,dst_file] ... [x=index_file] ..

 Receive files:

  qcp [device] REceive [options]* [-f forced_filename | -p prefix]

Options:

 -f filename     Force the received file to have this filename
 -l logfile      Log file transmission / receptions to this logfile
 -m              Supress making directories for received files
 -n              Receive only files newer than existing files
 -p prefix       Place this file or path prefix on received filenames
 -q              Be quiet during file transfer
 -r              Relaxed timing, double timeouts and quadruple retry counts
 -s packet_size  Specify an alternate packet_size (default: 2048 bytes)
 -t              Stamp today's date on received files
 -u              Unlink existing files that lack write permission
 -V, -v          Display error status while transferring files
 x=index_file    A list of filenames to send.

Description:

The qcp utility provides an error-checked file transfer protocol that is  used
to transmit or receive files.

Normally  users of the QNX update system will use the 'upload', 'download' and
'batch' utilities which will invoke qcp automatically. However, you  can  also
run qcp manually.

The qcp utility automatically sends files with  their  pathnames,  attributes,
permissions, and date fields intact.

If you are using qtalk to communicate with the QNX update system, the qtalk on
your  end will automatically start 'qcp receive' on your end when a 'qcp send'
is run on the update system. For example, to transfer a couple files  to  your
system you might do something like this:

 qcp se file1 file2,newname x=file4

This will cause the update system to send files to you; the qtalk on your  end
will automatically start qcp to receive the file. The files sent will be:

 o  file1

 o  file2 (it will appear on your system with the filename 'newname')

 o  all the files named in the index file file4

To send a file to the QNX update system, type the following command  into  the
shell on the update system end:

   qcp re

then use the ctrl-a command to get to the qtalk command prompt, and select 's'
for 'send a file'.  Qtalk will then prompt you for the filename to  send,  and
will invoke qcp send for you with that filename.

You  can  abort  a  qcp  file transfer in progress by pressing either <Esc> or
<space>. In turn, qcp displays a prompt asking for confirmation of the action.
To confirm aborting qcp, you enter 'y'. If a remote qcp  in  a  receive  state
must be shut down, the following control-character sequence will abort it:

   ^V  ^X  ^X

Note that qcp will automatically remove any partially transferred files.

See also: batch, download, upload


==============================================================================
QED                                      QNX2 STYLE FULL-SCREEN EDITOR (QNX2)

Syntax:

 qed [-br] [file [commands]*]

Options:

 -b     Browse the file only. Do not allow writing the file back.
 -r     Restrict ability to shell out, switch to different files, etc.

Description:

The qed utility is the QNX 2 full-screen editor, ported to QNX4.

See also: jove, vedit, vi


==============================================================================
RB                                               YMODEM RECEIVE PROTOCOL (PD)

rb                  : YMODEM receive (see rx, rz, qcp; also sb, sx, sz)

rz 3.05 03-20-91 for SYS III/V by Chuck Forsberg, Omen Technology INC
    "The High Reliability Software"

Usage:  rz [-ev]        (ZMODEM)
or  rb [-v]         (YMODEM)
or  rx [-cv] file   (XMODEM or XMODEM-1k)

     -c Use 16 bit CRC  (XMODEM)
     -e Escape control characters   (ZMODEM)
     -v Verbose more v's give more info


==============================================================================
RM                                                       REMOVE FILES (POSIX)

Syntax:

 rm [-f] [-i] [-rR] [-l <levels>] [-d] [-v] filename...

Options:

 -d          Used with -R, causes files to be removed but the directory
             tree itself to remain intact. (No rmdirs are done.)
 -f          Force removal (ignore lack of write permission).
 -i          Interactive - prompt to stderr requesting confirmation.
 -l n        Only recurse n levels of a directory tree.
 -r | -R     Recursive - permits directory trees & contents to be removed.
 -v          Verbose - prints out files & dir names as they are removed.

Examples:

 rm a.out core        Remove the a.out and core files.

 rm -Rf junk          Remove the directory junk and all its contents,
                      without prompting when files lacking write permission
                      are encountered.

Description:

The rm utility removes each specified file from a directory.

By default, rm refuses to remove any file that names a directory. This
may be overridden with the -R or -r options. In any case, rm always
will refuse to remove the current working directory.

If a file operand has been specified but doesn't exist and the -f option
hasn't been given, a message is written to the standard error. If -f has
been supplied on the command line, the error message isn't written. In
either case, rm will go on to any remaining files named on the command
line.

The rm utility doesn't necessarily cause the removal of the file itsef.
A file may have more than one link; that is, it may be known by more
than one name in the filesystem. The rm utility breaks one such link; it
dissociates the file from one name. If this is the only link, the file
data becomes inaccessible and the file space is returned to the system
for reuse. Otherwise, the data remains accessible via the other names.

See also: rmdir


==============================================================================
RX                                               XMODEM RECEIVE PROTOCOL (PD)

rx                  : XMODEM receive (see rb, rz, qcp; also sb, sx, sz)


rz 3.05 03-20-91 for SYS III/V by Chuck Forsberg, Omen Technology INC
    "The High Reliability Software"

Usage:  rz [-ev]        (ZMODEM)
or  rb [-v]         (YMODEM)
or  rx [-cv] file   (XMODEM or XMODEM-1k)

     -c Use 16 bit CRC  (XMODEM)
     -e Escape control characters   (ZMODEM)
     -v Verbose more v's give more info
Please read the manual page BUGS chapter!

==============================================================================
RZ                                               ZMODEM RECEIVE PROTOCOL (PD)

rz                  : ZMODEM receive (see rb, rx, qcp; also rb, sx, sz)

rz 3.05 03-20-91 for SYS III/V by Chuck Forsberg, Omen Technology INC
    "The High Reliability Software"

Usage:  
    rz [-ev]        (ZMODEM)
or  rb [-v]         (YMODEM)
or  rx [-cv] file   (XMODEM or XMODEM-1k)

     -c Use 16 bit CRC  (XMODEM)
     -e Escape control characters   (ZMODEM)
     -v Verbose more v's give more info

Please read the manual page BUGS chapter.


==============================================================================
TERMDEF                                DISPLAY OR SET THE TERMINAL TYPE (QNX)

Syntax:

 termdef [-c command] [-eI] [terminal_type]
 termdef -s [terminal_type]
 termdef - [terminal_type]

Options:

 -                  : report terminal type to stdout. Do not exec into login.
 -c command         : command to start (default is "/bin/login -p")
 -e                 : use the terminal type currently defined by the
                      TERM environment variable.
 -I                 : don't output terminal initialization strings
 -s                 : output shell commands for setting $TERM to stdout,
                      do not exec into login (or other command via -c).
Where:
 terminal_type      is the name of a terminal type that may be supplied
                    on the command line. When this is supplied a terminal
                    type will not be prompted for and -e is overridden.
Note:

When  the  terminal  type  obtained via -e or a terminal_type specified on the
command line is invalid, a warning message will be written to  standard  error
and the terminal type will be prompted for.

Description:

The termdef utility is used to set the terminal type. It is  normally  invoked
by tinit,  modem,  etc. Its uses at the command line include querying terminal
type ('termdef -'), resetting  terminal  emulation  ('termdef  -es'),  sending
initialization sequences for a new terminal type ('termdef -s' - you will have
to manually export TERM=terminaltype).

In the update system environment, the 'profile' command is used to select your
desired terminal type.  This setting  (when  done  through  profile)  will  be
preserved between calls.

See also: profile


==============================================================================
TOUCH                       CHANGE FILE ACCESS AND MODIFICATION TIMES (POSIX)

Syntax:

 touch [-amc] [-r ref_file] [-t time] file...

Options:

 -a             Touch access time
 -c             Don't create files if they do not exist
 -m             Touch modify time
 -r ref_file    Use time of 'ref_file' for touching
 -t time        Use 'time' for touching

Where:

 Time format is [[CC]YY]MMDDhhmm[.SS]
   CC           Century
   YY           Year
   MM           Month (01-12)
   DD           Day (01-31)
   hh           Hour (00-23)
   mm           Minute (00-59)
   SS           Seconds (00-61)

Description:

The touch utility lets you change either  the  modification  times  or  access
times of files, or both.

If  any  file  you specify doesn't exist, the file will be created (unless you
specify the -c option).  If no time is specified, the  current  time  will  be
used. The  -a  option  causes  only the file access time to be changed; the -m
option changes only the file modification time.

If  you  don't  specify  any  options, tough behaves as if both -a and -m were
specified i.e. both the access and modification times will be set.

See also: ls


==============================================================================
UPLOAD                             UPLOAD FILES TO THE UPDATE SYSTEM (UPDATE)

Syntax:

 upload

Description:

The  upload  utility allows you to upload files from your system to the update
system. 'upload' will invoke the receive file transfer protocol  selected  in
your profile  (see  'profile').  If  no transfer protocol is specified in your
profile, the qcp protocol will be used.


See also: batch, download, profile, quics_download, quics_inject, qcp,
          rb/sb, rx/sx, rz/sz


==============================================================================
USE                                               PRINT A USAGE MESSAGE (QNX)

Syntax:

 use command

Where:

 command   is the name of an executable load module or shell script that
           contains a usage message

Description:

The use utility will display a 'usage message' associated with a program. This
is normally enough of a manual to make use of a  program  if  you  don't  have
printed documentation.    This  command replaces the QNX2 "program ?" to get a
usage message.

See also: help


==============================================================================
VEDIT                                      STANDARD FULL-SCREEN EDITOR (QNX4)

Syntax:

 vedit [-options] infile [outfile]

Options:

 -b           Browse mode
 -c commands  Execute macro language 'commands'
 -i execfile  Execute 'execfile' in place of "veditrc"
 -m           Use monochrome (B/W) screen colors
 -snnn        Restrict additional memory usage to 'nnn' Kbytes
 -x execfile  Execute autostartup file 'execfile'
 -nnn         Start editing on line 'nnn'
 --           Indicates last option, permits 'infile' beginning with "-"

Description:

The  vedit  utility  is  the  standard  full-screen editor shipped with QNX 4 
systems. Help is available online within vedit (use function key 1).

See also: linput, profile, qed, jove, vi


==============================================================================
VI                             FULL_SCREEN EDITOR (SIMILAR TO UNIX VI) (UNIX)

Syntax:

 elvis [options] [+cmd] [files...]

Options:
 -r           To the real vi, this flag means that a previous edit
              should be recovered. Elvis, though, has a separate program,
              called virec(1), for recovering files. When you invoke elvis
              with -r, elvis will tell you to run virec.
 -R           This sets the "readonly" option, so you won't accidentally 
              overwrite a file.
 "-t tag"     This causes elvis to start editing at the given tag.
 "-m [file]"  Elvis will search through file for something that looks like
              an error message from a compiler. It will then begin editing
              the source file that caused the error, with the cursor sitting
              on the line where the error was detected. If you don't 
              explicitly name a file, then "errlist" is assumed.
 -e           Elvis will start up in colon command mode.
 -v           Elvis will start up in visual command mode.
 -i           Elvis will start up in input mode.
 +command     If you use the +command parameter, then after the first file
              is loaded command is executed as an EX command. A typical
              example would be "elvis +237 foo", which would cause elvis to
              start editing foo and then move directly to line 237.

Description:

Elvis is a text editor which emulates vi/ex.

When elvis is invoked as "vi", it behaves exactly as though it was invoked 
as "elvis".

Files:

/tmp/elv*

During editing, elvis stores text in a temporary file.  For  UNIX,  this  file
will  usually  be stored in the /tmp directory, and the first three characters
will be "elv". For other systems, the temporary files may be stored someplace 
else; see the version-specific section of the documentation.

tags

This is  the  database  used  by  the :tags command and the -t option.  It is 
usually created by the ctags(1) program.

Bugs:

There is no LISP support.
Certain other features are missing, too.

Auto-indent mode is not quite compatible with the real vi.
Among other things, 0^D and ^^D don't do what you might expect.

Long lines  are  displayed  differently.    The  real vi wraps long lines onto
multiple rows of the screen, but elvis scrolls sideways.

Author:

Steve Kirkendall
kirkenda@cs.pdx.edu
\&...uunet!tektronix!psueea!eecs!kirkenda


Many other people have worked to port elvis to various operating systems.   To
see  who  deserves credit, run the :version command from within elvis, or look
in the system-specific section of the complete documentation.


==============================================================================
VIEW                                    VIEW QNX2 or QNX4 ASCII FILES (QUICS)

Syntax:

 view filename

Where:

 filename  is the name of the ascii text file you wish to examine.

Description:

The view utility can be used to examine the numerous ascii text files
available on QUICS. This utility accomplishes this by utilizing the 'textto'
utility (to translate the QNX 2 record-seperators or DOS
carriage-return-linefeeds to QNX 4 line feeds) and 'less' to browse the file.
If the file being viewed is a QNX 4 ascii text file, you may use the 'less'
command directly. You may also browse a QNX 2, DOS or QNX 4 file using the
'qed' utility.

See also: qed


==============================================================================
WHICH                                            LOCATE A PROGRAM FILE (UNIX)

Syntax:

 which [-alf] program...

Options:

 -a     Find every occurence of program in PATH.
 -f     Display the full QNX pathname.
 -l     Display in long format (like ls -l).

Description:

The which utility searches the user's path (as defined by the PATH environment
variable) for each program specified.


==============================================================================
WHO                                      DISPLAY WHO IS ON THE SYSTEM (POSIX)

Syntax:

 who [-aimow] [-n node]

Options:

 -a         Show all users on the network.
 -i         Output user's input idle time.
 -m         Output information on me only.
 -n node    Show all users on this node.
 -o         Output user's output idle time.
 -w         Show if terminal has write access in POSIX format.

Description:

The  who  utility  lists  various  pieces  of  information about users who are
currently logged in to the system.

If you don't specify any options, the default output includes the user's login
name,  terminal  name,  time at which the user logged in, input idle time, and
the command being run.

If an idle time is reported as dashes, then no input (output) occurred yet  on
that tty.

See also: ps


==============================================================================
XARGS                  CONSTRUCT ARGUMENT LIST(S) AND EXECUTE PROGRAM (POSIX)

Syntax:

 xargs [-t] [-n numargs] [-s size] [-i] [command [initial_arguments...]]

Options:

 -n numargs    Maximum number of arguments to append to command line.
 -s size       Maximum number of chars for complete command line.
 -t            Trace (write each command line to stderr prior to execution).
 -i            Insert mode, issue parameters one at a time, replacing each
               instance of {} with the parameter.
Where:

 command            is the command to execute (echo if not specified).
 initial_arguments  is a list of initial arguments to 'command' which 
                    are to precede the list of arguments formed from
                    the standard input to xargs, each time the command
                    is executed.

Description:

The xargs utility constructs argument lists from lines read in standard  input
and invokes  the program named on the command line with those arguments.  This
is repeated until standard input is exhausted. (Often used in conjunction with
'find'.)

The  utility executes a given program with initial-arguments one or more times
using the parameters read from standard input. The number of strings  appended
may  be  limited by the -n option; the size of the command line may be limited
by the -s option.

The strings are separated by <blank>s or <newline>s, which may be embedded  in
the strings  by  prefixing them with \ or enclosing them in quotes ("). To use
the quote character itself, you must prefix it with \.

The  -i option causes the command to be executed for once for each string read
from standard input. Instead of the normal process of appending the string  to
the  command  buffer  after the command name and initial arguments, the string
will instead be inserted at every instance of  {}  within  the  arguments.  If
there  are  no  instances  of {} within the arguments, then the string will be
appended in the usual manner as if -i were not specified (though the  -i  will
still  have  had an effect as the command will still be invoked once for every
line - the same effect as -n 1).

When  a program is executed, it inherits standard output and standard error of
xargs. Standard input is set to the controlling tty.

The xargs utility will always limit the total  command  buffer  size  to  4096
characters. The  following example may be used to verify the integrity of data
files on a floppy disk (mounted as /fd):

 find /fd -print | xargs cksum | diff check_file -

In this example, find will print out the names of each  file  on  the  mounted
filesystem. The  xargs  utility  will  group  the  filenames  up  for cksum to
minimize the number of times cksum must be executed. The diff utility is  then
used  to  verify that the calculated checksums are the same as recorded in the
check_file file.

It is important to note that the following command: 

 find /fd -exec cksum '{}' \; | diff check_file - 

would  perform  the  same  utility, but would require cksum to be reloaded for
each file being checked, thus taking a much longer time to execute.

See also: find
