rwho display information on network
users
sed -e "action" file use stream editor on file
sh Bourne shell
shl the Shell Layer Manager
sort file perform an alphabetic sort based on
the first field of file
sort -n file perform a numeric sort based on the
first field of file
sort +x file sort on field x+1
sort -ta file use a as a field separator
spell file check file for correct spelling
stty display current stty settings
stty intr set interrupt character to
stty kill set kill character to
talk talk with user on your terminal
talk file display the last 10 lines of file
telenet host connect to a remote host
telenet annex connect to an Annex for use of an
outbound port
tr a b file in file, change every a to b
vi file edit file with a full screen editor
wc file list the number of lines, words and
characters in file
write user send a message to user's terminal
uucp file hostpath remote copy
APPENDIX I: vi COMMANDS QUICK REFERENCE
Special Commands
Esc return to command mode
u undo last command
. repeat last insert, delete or put command
Saving Text and Quitting
:w write (save) text
:w newfile save text to file newfile
:x,yw newfile save lines x to y into newfile
:q! quit without saving changes
:wq save text and quit
Cursor Positioning
N move to line N
N+ down N lines
N- up N lines
^D down one screen
^U up one screen
k up one line
j down one line
^ beginning of line
$ end of line
Nw N words ahead
Nb back N words
w word ahead
b back one word
e end of word
h backspace
l forward one space
arrow keys space left or right, go up or down one line
Searches
/pattern search forward for pattern
?pattern search backward for pattern
? or / repeat the last search
Deleting Text
Ndd delete N lines
dd delete current line
D delete remainder of line
Ndw delete N words
dw delete current word
Nx delete N characters
x delete one character
Copying Text
NY yank N lines
Y yank one line
Nyw yank N words
yw yank one word
P put yanked lines above current cursor position, or
put yanked words before current cursor position
p put yanked lines below current cursor position, or
put yanked words after current cursor position
Entering Text Mode
I enter text mode, additional text appears at the
beginning of the current line
i enter text mode, additional text appears before
the current cursor position
A enter text mode, additional text appears at the
end of the current line
a enter text mode, additional text appears after the
current cursor position.
O enter text mode, open a line above the current
line
o enter text mode, open a line below the current
line
Replacing and Substituting Text
r replace one character at current cursor position,
then return to command mode
R replace characters until Esc
s substitute characters for the current character
until Esc
Ns substitute characters for the current N characters
until Esc
Reading in Text
:r filename append the contents of filename below the current
cursor position
:r !shell-cmd append the output of shell-cmd below the current
cursor position
Global Operations
:x,ys/old/new/g
on lines x through y, change old to new
:x,yg/pattern/d
delete any line from x toy that has the string
pattern
NOTES
??
APPENDIX J: vi COMMANDS REFERENCE
NAME
vi - screen-oriented (visual) display editor based on ex
SYNOPSIS
vi [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [ -C
] [ -ccommand ] file ...
view [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [
-C ] [ -ccommand ] file ...
vedit [ -t tag ] [ -r file ] [ -L ] [ -wn ] [ -R ] [ -x ] [
-C ] [ -ccommand ] file ...
DESCRIPTION
vi (visual) is a display-oriented text editor based on an
underlying line editor ex(1). It is possible to use the
command mode of ex from within vi and vice-versa. The visual
commands are described on this manual page; how to set
options (like automatically numbering lines and
automatically starting a new output line after a carriage
return) and all ex(1) line editor commands are described on
the ex(1) manual page.
When using vi, changes made to the file are reflected in
what is displayed on the terminal screen. The position of
the cursor on the screen indicates the position within the
file.
INVOCATION
The following invocation options are interpreted by vi:
-t tag Edit the file containing the tag and position the
cursor at its definition. The file (tags)
containing the tag is found in the current directory
or in /usr/lib/tags. Below is an example of a tags
file:
line /tmp/vi.file /line/
this /tmp/vi.file /this/
Using "vi -t line", the edited file will be
"/tmp/vi.file". The file will be searched for the
first occurrence of "line", and the cursor will be
placed at "line".
-r file Edit file after an editor or system crash.
(Recovers the version of file that was in the buffer
when the crash occurred.)
-L List the name of all files saved as the result of an
editor or system crash.
-wn Set the default window size to n. This is useful
when using the editor over a slow speed line.
-R Readonly mode; the readonly flag is set, preventing
accidental overwriting of the file.
-x Encryption option; when used, vi simulates the X
command of ex(1) and prompts the user for a key.
This key is used to encrypt and decrypt text using
the algorithm of crypt(1). The X command makes an
educated guess to determine whether or not text read
in is encrypted. The temporary buffer file is
encrypted also, using a transformed version of the
key typed in for the -x option. See crypt(1).
Also, see the WARNING section at the end of this
manual page.
-C Encryption option, same as the -x option, except
that vi simulates the C command of ex(1). The C
command is like the X command of ex(1), except that
all text read in is assumed to have been encrypted.
-c command Begin editing by executing the specified
editor command (usually a search or positioning
command).
The file argument indicates one or more files to be edited.
The view invocation is the same as vi except that the
readonly flag is set.
The vedit invocation is intended for beginners. It is the
same as vi except that the report flag is set to 1, the
showmode and novice flags are set, and magic is turned off.
These defaults make it easier to learn vi.
VI MODES
Command Normal and initial mode. Other modes return to
command mode upon completion. ESC (escape) is used
to cancel a partial command.
Input Entered by setting the following options: a i A I o
O c s R. Arbitrary text may then be entered.
Input mode is normally terminated with ESC
character, or abnormally with interrupt.
Last line
Reading input for : / ? or !; terminate with CR to
execute, interrupt to cancel.
COMMAND SUMMARY
In the descriptions, CR stands for carriage return and ESC
stands for the escape key.
Sample Commands
<- | | -> arrow keys move the cursor
h j k l same as arrow keys
itextESC insert text
cwnewESC change word to new
easESC pluralize word (end of word; append s;
escape from input state)
x delete a character
dw delete a word
dd delete a line
3dd delete 3 lines
u undo previous change
ZZ exit vi, saving changes
:q!CR quit, discarding changes
/textCR search for text
U D scroll up or down
:ex cmdCR any ex or ed command
Counts Before vi Commands
Numbers may be typed as a prefix to some commands. They are
interpreted in one of these ways:
line/column number z G |
scroll amount D U
repeat effect most of the rest
Interrupting, Canceling
ESC end insert or incomplete cmd
DEL (delete or rubout) interrupts
L reprint screen if DEL scrambles it
R reprint screen if L is -> key
File Manipulation
ZZ if file is modified, write and exit;
otherwise, exit
:wCR write back changes
:w!CR forced write, if permission originally
not valid
:qCR quit
:q!CR quit, discard changes
:e nameCR edit file name
:e!CR reedit, discard changes
:e + nameCR edit, starting at end
:e +n filename CR edit starting at line n
:e #CR edit alternate file
:e! #CR edit alternate file, discard changes
:w nameCR write file name
:w! nameCR overwrite file name
:shCR run shell, then return
:!cmdCR run cmd, then return
:nCR edit next file in arglist
:n argsCR specify new arglist
G show current file and line
:ta tagCR to tag file entry tag
In general, any ex or ed command (such as substitute or
global) may be typed, preceded by a colon and followed by a
CR.
Positioning Within File
F forward screen
B backward screen
D scroll down half screen
U scroll up half screen
Ng go to the beginning of the specified
line (end default), where n is a line
number
/pat next line matching pat
?pat prev line matching pat
n repeat last / or ? command
N reverse last / or ? command
/pat/+n nth line after pat
?pat?-n nth line before pat
]] next section/function
[[ previous section/function
( beginning of sentence
) end of sentence
{ beginning of paragraph
} end of paragraph
% find matching ( ) { or }
Adjusting The Screen
L clear and redraw
zCR clear and redraw window if ^L is -> key
ZCR redraw screen with current line at top
of window
z-CR redraw screen with current line at
bottom of window
z.CR redraw screen with current line at
center of window
/pat/z-CR move pat line to bottom of window
zn.CR use n line window
E scroll window down 1 line
Y scroll window up 1 line
Marking and Returning
`` move cursor to previous context
'' move cursor to first non-white space in
line
mx mark current position with the ACSII
lower-case letter x
`x move cursor to mark x
'x move cursor to first non-white space in
line marked by x
Line Positioning
H top line on screen
L last line on screen
M middle line on screen
+ next line, at first non-white
- previous line, at first non-white
CR return, same as +
| or j next line, same column
| or k previous line, same column
Character Positioning
first non-white-space character
0 beginning of line
$ end of line
l or -> forward
h or <- backwards
H same as <- (backspace)
space same as -> (space bar)
fx find next x
Fx find previous x
tx move to character prior to next x
Tx move to character following previous x
; repeat last f F
, repeat last t T
n| to specified column
% find matching () { or }
Words, Sentences, Paragraphs
w forward a word
b back a word
e end of word
) to next sentence
} to next paragraph
( back a sentence
{ back a paragraph
W forward a blank-delimited word
B back a blank-delimited word
E to end of a blank-delimited word
Corrections During Insert
H erase last character (backspace)
W erase last word
erase erase, same as H
kill kill, erase this line of input
\ quotes H, erase and kill characters
ESC ends insertion, back to command mode
DEL interrupt, terminates insert mode
D backtab one character; reset left margin
of autoindent
|D caret () followed by control-d (D);
backtab to beginning of line; do not
reset left margin of autoindent
0D backtab to beginning of line; reset left
margin of autoindent
V quote non-printable character
Insert and Replace
a append after cursor
A append at end of line
i insert before cursor
I insert before first non-blank
o open line below
O open above
rx replace single char with x
RtextESC replace characters
Operators
Operators are followed by a cursor motion, and affect all
text that would have been moved over. For example, since w
moves over a word, dw deletes the word. Double the
operator, e.g., dd to affect whole lines.
d delete
c change
y yank lines to buffer
< left shift
> right shift
! filter through command
Miscellaneous Operations
C change rest of line (c$)
D delete rest of line (d$)
s substitute chars (cl)
S substitute lines (cc)
J join lines
x delete characters (dl)
X ... before cursor (dh)
Y yank lines (yy)
Yank and Put
Put inserts the text most recently deleted or yanked;
however, if a buffer is named (using the ASCII lower-case
letters a - z), the text in that buffer is put instead.
3yy yank 3 lines
3yl yank 3 characters
p put back text after cursor
P put back text before cursor
"xp put from buffer x
"xY ("xyy) yank to buffer x
"xD ("xdd) delete into buffer x
Undo, Redo, Retrieve
u undo last change
U restore current line
. repeat last change
"dp retrieve d'th last delete
AUTHOR
vi and ex were developed by The University of California,
Berkeley California, Computer Science Division, Department
of Electrical Engineering and Computer Science.
FILES
/tmp default directory where temporary
work files are placed; it can be
changed using the directory option
(see the ex(1) set command)
/usr/lib/terminfo/?/* compiled terminal description
database
/usr/lib/.COREterm/?/* subset of compiled terminal
description database, supplied on
hard disk
NOTES
Two options, although they continue to be supported, have
been replaced in the documentation by options that follow
the Command Syntax Standard (see intro(1)). A -r option
that is not followed with an option-argument has been
replaced by -L and +command has been replaced by -c command.
SEE ALSO
ed(1), ex(1).
"Screen Editor Tutorial (vi)" in the UMAX V User's Guide.
WARNING
The encryption options are provided with the Security
Administration Utilities package, which is available only in
the United States.
Tampering with entries in /usr/lib/.COREterm/?/* or
/usr/lib/terminfo/?/* (for example, changing or removing an
entry) can affect programs such as vi(1) that expect the
entry to be present and correct. In particular, removing
the "dumb" terminal may cause unexpected problems.
BUGS
Software tabs using T work only immediately after the
autoindent.
Left and right shifts on intelligent terminals do not make
use of insert and delete character operations in the
terminal.
APPENDIX K: ftp COMMANDS REFERENCE
NAME
ftp - Internet file transfer program
SYNOPSIS
ftp [ -v ] [ -d ] [ -i ] [ -n ] [ -g ] [ host ]
DESCRIPTION
ftp is the user interface to the DARPA File Transfer
Protocol. The program transfers files to and from a remote
network site.
The client host with which ftp is to communicate can be
specified on the command line. In this case, ftp immediately
attempts to establish a connection to an FTP server on that
host; otherwise, ftp enters its command interpreter and
waits for instruction, displaying the prompt ftp>.
ftp recognizes the following commands:
! [ command [ args ] ]
Invoke an interactive shell on the local machine.
If there are arguments, the first is taken to be a
command to execute directly, with the rest of the
arguments as its arguments.
$ macro-name [ args ]
Execute the macro-name that was defined with
the macdef command. Arguments are passed to the
macro unglobbed.
account [ passwd ]
Supply a supplemental password required by a
remote system for access to resources once a login
has been successfully completed. If no argument
is included, the user will be prompted for an
account password in a non-echoing input mode.
append local-file [ remote-file ]
Append a local file to a file on the remote
machine. If remote-file is left unspecified, the
local file name is used to name the remote file
after being altered by any ntrans or nmap setting.
File transfer uses the current settings for type,
format, mode, and structure.
ascii Set the file transfer type to network ASCII. This
is the default type.
bell Sound a bell after each file transfer command is
completed.
binary Set the file transfer type to support binary image
transfer.
bye Terminate the FTP session with the remote server
and exit ftp.
case Toggle remote computer file name case mapping
during mget commands. When case is on (default is
off), remote computer file names with all letters
in upper case are written in the local directory
with the letters mapped to lower case.
cd remote-directory
Change the working directory on the remote machine
to remote-directory.
cdup Change the remote machine working directory to the
parent of the current remote machine working
directory.
close Terminate the FTP session with the remote server,
and return to the command interpreter. Any
defined macros are erased.
cr Toggle carriage return stripping during ASCII type
file retrieval. Records are denoted by a carriage
return/linefeed sequence during ASCII type file
transfer. When cr is on (the default), carriage
returns are stripped from this sequence to conform
with the UNIX single linefeed record delimiter.
Records on non-UNIX remote systems may contain
single linefeeds; when an ASCII type transfer is
made, these linefeeds may be distinguished from a
record delimiter only when cr is off.
delete remote-file
Delete the file remote-file on the remote machine.
debug [ debug-value ]
Toggle debugging mode. If an optional debug-value
is specified, it is used to set the debugging
level. When debugging is on, ftp prints each
command sent to the remote machine, preceded by
the string --> .
dir [ remote-directory ] [ local-file ]
Print the contents of directory, remote-directory,
and, optionally, place the output in local-file.
If no directory is specified, the current working
directory on the remote machine is used. If no
local file is specified, or local-file is -,
output comes to the terminal.
disconnect
A synonym for close.
form format
Set the file transfer form to format. The default
format is file.
get remote-file [ local-file ]
Retrieve the remote-file and store it on the local
machine. If the local file name is not specified,
it is given the same name it has on the remote
machine, subject to alteration by the current
case, ntrans, and nmap settings. The current
settings for type, form, mode, and structure are
used while transferring the file.
glob Toggle filename expansion for mdelete, mget and
mput. If globbing is turned off with glob, the
file name arguments are taken literally and not
expanded. Globbing for mput is done as in csh(1).
For mdelete and mget, each remote file name is
expanded separately on the remote machine and the
lists are not merged. Expansion of a directory
name is likely to be different from expansion of
the name of an ordinary file: the exact result
depends on the foreign operating system and FTP
server, and can be previewed by doing
"mls remote-files -". Note: mget and mput are
not meant to transfer entire directory subtrees of
files. That can be done by transferring a tar(1)
archive of the subtree (in binary mode).
hash Toggle number-sign (#) printing for each data
block transferred. The size of a data block is
1024 bytes.
help [ command ]
Print a description of command. With no argument,
ftp prints a list of the known commands.
lcd [ directory ]
Change the working directory on the local machine.
If no directory is specified, changes to the
user's home directory.
ls [ remote-directory ] [ local-file ]
Print an abbreviated listing of the contents of a
directory on the remote machine. If remote-
directory is left unspecified, the current working
directory is used. If no local file is specified,
the output is sent to the terminal.
macdef macro-name
Define a macro. Subsequent lines are stored as
the macro macro-name; a null line (consecutive
newline characters in a file or carriage returns
from the terminal) terminates macro input mode.
There is a limit of 16 macros and 4096 total
characters in all defined macros. Macros remain
defined until a close command is executed. The
macro processor interprets "$" and "\" as special
characters. A "$" followed by a number (or
numbers) is replaced by the corresponding argument
on the macro invocation command line. A "$"
followed by an "i" signals that macro processor
that the executing macro is to be looped. On the
first pass "$i" is replaced by the first argument
on the macro invocation command line, on the
second pass it is replaced by the second argument,
and so on. A "\" followed by any character is
replaced by that character. Use the "\" to
prevent special treatment of the "$".
mdelete [ remote-files ]
Delete the specified files on the remote machine.
mdir remote-files local-file
Like dir, except multiple remote files may be
specified. If interactive prompting is on, ftp
will prompt the user to verify that the last
argument is indeed the target local file for
receiving mdir output.
mget remote-files
Expand the remote-files on the remote machine and
do a get for each file name thus produced. See
glob for details on the filename expansion.
Resulting file names will then be processed
according to case, ntrans, and nmap settings.
Files are transferred into the local working
directory, which can be changed with
"lcd directory"; new local directories can be
created with "! mkdir directory".
mkdir directory-name
Make a directory on the remote machine.
mls remote-files local-file
Like ls, except multiple remote files may be
specified. If interactive prompting is on, ftp
will prompt the user to verify that the last
argument is indeed the target local file for
receiving mls output.
mode [ mode-name ]
Set the file transfer mode to mode-name. The
default mode is stream.
mput local-files
Expand wild cards in the list of local files given
as arguments and do a put for each file in the
resulting list. See glob for details of filename
expansion. Resulting file names will then be
processed according to ntrans and nmap settings.
nmap [ inpattern outpattern ]
Set or unset the filename mapping mechanism. If
no arguments are specified, the filename mapping
mechanism is unset. If arguments are specified,
remote filenames are mapped during mput commands
and put commands issued without a specified remote
target filename. If arguments are specified,
local filenames are mapped during mget commands
and get commands issued without a specified local
target filename. This command is useful when
connecting to a non-UNIX remote computer with
different file naming conventions or practices.
The mapping follows the pattern set by inpattern
and outpattern. inpattern is a template for
incoming filenames (which may have already been
processed according to the ntrans and case
settings). Variable templating is accomplished by
including the sequences "$1", "$2", ..., "$9" in
inpattern. Use "\" to prevent this special
treatment of the "$" character. All other
characters are treated literally, and are used to
determine the nmap inpattern variable values. For
example, given inpattern $1.$2 and the remote file
name mydata.data, $1 would have the value mydata,
and $2 would have the value data. The outpattern
determines the resulting mapped filename. The
sequences "$1", "$2", ..., "$9" are replaced by
any value resulting from the inpattern template.
The sequence "$0" is replaced by the original
filename. Additionally, the sequence
"[seq1,seq2]" is replaced by seq1 if seq1 is not a
null string; otherwise it is replaced by seq2.
For example, the command "nmap $1.$2.$3
[$1,$2].[$2,file]" would yield the output filename
myfile.data for input filenames myfile.data and
myfile.data.old, myfile.file for the input
filename myfile, and myfile.myfile for the input
filename .myfile. Spaces may be included in
outpattern, as in the example:
nmap $1 | sed "s/ *$//" > $1
Use the "\" character to prevent special treatment
of the "$", "[", "]", and "," characters.
ntrans [ inchars [ outchars ] ]
Set or unset the filename character translation
mechanism. If no arguments are specified, the
filename character translation mechanism is unset.
If arguments are specified, characters in remote
filenames are translated during mput commands and
put commands issued without a specified remote
target filename. If arguments are specified,
characters in local filenames are translated
during mget commands and get commands issued
without a specified local target filename. This
command is useful when connecting to a non-UNIX
remote computer with different file naming
conventions or practices. Characters in a
filename matching a character in inchars are
replaced with the corresponding character in
outchars. If the character's position in inchars
is longer than the length of outchars, the
character is deleted from the file name.
open host [ port ]
Establish a connection to the specified host's FTP
server. An optional port number can be supplied,
in which case, ftp attempts to contact an FTP
server at that port. If the auto-login option is
on (default), ftp also attempts to automatically
log the user in to the FTP server (see below).
prompt Toggle interactive prompting. Interactive
prompting occurs during multiple file transfers to
allow the user to selectively retrieve or store
files. If prompting is turned off (default), any
mget or mput transfers all files and mdelete will
delete all files.
proxy ftp-command
Execute an ftp command on a secondary control
connection. This command allows simultaneous
connection to two remote FTP servers for
transferring files between the two servers. The
first proxy command should be an open, to
establish the secondary control connection. Enter
the command "proxy ?" to see other ftp commands
executable on the secondary connection. The
following commands behave differently when
prefaced by proxy: open will not define new
macros during the auto-login process, close will
not erase existing macro definitions, get and mget
transfer files from the host on the primary
control connection to the host on the secondary
control connection, and put, mput, and append
transfer files from the host on the secondary
control connection to the host on the primary
control connection. Third party file transfers
depend upon support of the FTP protocol PASV
command by the server on the secondary control
connection.
put local-file [ remote-file ]
Store a local file on the remote machine. If
remote-file is left unspecified, the local file
name is used in naming the remote file, after
processing according to any ntrans or nmap
settings. File transfer uses the current settings
for type, format, mode, and structure.
pwd Print the name of the current working directory on
the remote machine.
quit A synonym for bye.
quote arg1 arg2 ...
The arguments specified are sent, verbatim, to the
remote FTP server.
recv remote-file [ local-file ]
A synonym for get.
remotehelp [ command-name ]
Request help from the remote FTP server. If a
command-name is specified, it is supplied to the
server as well.
rename [ from ] [ to ]
Rename, on the remote machine, the file from to
the file to.
reset Clear reply queue. This command re-synchronizes
command/reply sequencing with the remote FTP
server. Resynchronization may be necessary
following a violation of the FTP protocol by the
remote server.
rmdir directory-name
Delete a directory on the remote machine.
runique Toggle storing of files on the local system with
unique filenames. If a file already exists with a
name equal to the target local filename for a get
or mget command, a ".1" is appended to the name.
If the resulting name matches another existing
file, a ".2" is appended to the original name. If
this process continues up to ".99", an error
message is printed, and the transfer does not take
place. The generated unique filename will be
reported. Note that runique will not affect local
files generated from a shell command (see below).
The default value is off.
send local-file [ remote-file ]
A synonym for put.
sendport Toggle the use of PORT commands. By default, ftp
attempts to use a PORT command when establishing a
connection for each data transfer. The use of PORT
commands can prevent delays when performing
multiple file transfers. If the PORT command
fails, ftp uses the default data port. When the
use of PORT commands is disabled, no attempt is
made to use them for each data transfer. This is
useful for certain FTP implementations that do
ignore PORT commands but wrongly indicate they
have been accepted.
status Show the current status of ftp.
struct [ struct-name ]
Set the file transfer structure to struct-name.
The default structure is stream.
sunique Toggle storing of files on remote machine under
unique file names. Remote FTP server must support
the FTP protocol STOU command for successful
completion. The remote server will report a
unique name. Default value is off.
tenex Set the file transfer type to that needed to talk
to TENEX machines.
trace Toggle packet tracing.
type [ type-name ]
Set the file transfer type to type-name. If no
type-name is specified, the current type is
printed. The default type is network ascii.
user user-name [ password ] [ account ]
The user identifies him/herself to the remote FTP
server. If the password is not specified and the
server requires it, ftp prompts the user for it
(after disabling local echo). If an account field
is not specified, and the FTP server requires it,
the user is prompted for it. If an account field
is specified, an account command will be relayed
to the remote server after the login sequence is
completed if the remote server did not require it
for logging in. Unless ftp is invoked with
"auto-login" disabled, this process is done
automatically on initial connection to the FTP
server.
verbose Toggle verbose mode. In verbose mode, all
responses from the FTP server are displayed to the
user. In addition, if verbose is on, when a file
transfer completes, statistics regarding the
efficiency of the transfer are reported. By
default, verbose is on.
? [ command ]
A synonym for help.
Command arguments that have embedded spaces can be quoted
with double quote (") marks.
ABORTING A FILE TRANSFER
To abort a file transfer, use the terminal interrupt key
(usually <ctrl>C). Sending transfers will be immediately
halted. Receiving transfers will be halted by sending a FTP
protocol ABOR command to the remote server, and discarding
any further data received. The speed at which this is
accomplished depends upon the remote server's support for
ABOR processing. If the remote server does not support the
ABOR command, an ftp> prompt will not appear until the
remote server has completed sending the requested file.
The terminal interrupt key sequence will be ignored when ftp
has completed any local processing and is awaiting a reply
from the remote server. A long delay in this mode may
result from the ABOR processing described above, or from
unexpected behavior by the remote server, including
violations of the FTP protocol. If the delay results from
unexpected remote server behavior, the local ftp program
must be killed by hand.
FILE NAMING CONVENTIONS
Files specified as arguments to ftp commands are processed
according to the following rules.
1. If the file name is -, the standard input (for reading)
or the standard output (for writing) is used.
2. If the first character of the file name is a bar |, the
remainder of the argument is interpreted as a shell
command. ftp then forks a shell, using popen(3S) with
the argument supplied, and reads (writes) from the
stdout (stdin). If the shell command includes spaces,
the argument must be quoted; for example, "| ls -lt". A
particularly useful example of this mechanism is
"dir | more".
3. Failing the above checks, if globbing is enabled, local
file names are expanded according to the rules used in
the csh(1); see the glob command. If the ftp command
expects a single local file (e.g., put), only the first
filename generated by the globbing operation is used.
4. For mget commands and get commands with unspecified
local file names, the local filename is the remote
filename, which may be altered by a case, ntrans, or
nmap setting. The resulting filename may then be
altered if runique is on.
5. For mput commands and put commands with unspecified
remote file names, the remote filename is the local
filename, which may be altered by a ntrans or nmap
setting. The resulting filename may then be altered by
the remote server if sunique is on.
FILE TRANSFER PARAMETERS
The FTP specification identifies many parameters that can
affect a file transfer. The type can be one of ascii, image
(binary), ebcdic, and local byte size (for PDP-10's and
PDP-20's mostly). ftp supports the ascii and image types of
file transfer, plus local byte size 8 for tenex mode
transfers.
ftp supports only the default values for the remaining file
transfer parameters: mode, form, and struct.
OPTIONS
Options can be specified at the command line, or to the
command interpreter.
The -v (verbose on) option forces ftp to show all responses
from the remote server, as well as report on data transfer
statistics.
The -n option restrains ftp from attempting "auto-login"
upon initial connection. If auto-login is enabled, ftp
checks the netrc file in the user's home directory for an
entry describing an account on the remote machine. If no
entry exists, ftp will prompt for the remote machine login
name (default is the user identity on the local machine),
and, if necessary, prompt for a password and an account with
which to login.
The -i option turns off interactive prompting during
multiple file transfers.
The -d option enables debugging.
The -g option disables file name globbing.
THE .netrc FILE
The .netrc file contains login and initialization
information used by the "auto-login" process. It resides in
the user's home directory. The following tokens are
recognized; they may be separated by spaces, tabs, or new-
lines:
machine name
Identify a remote machine name. The auto-login process
searches the .netrc file for a machine token that
matches the remote machine specified on the ftp command
line or as an open command argument. Once a match is
made, the subsequent .netrc tokens are processed,
stopping when the end of file is reached or another
machine token is encountered.
login name
Identify a user on the remote machine. If this token
is present, the "auto-login" process will initiate a
login using the specified name.
password string
Supply a password. If this token is present, the
"auto-login" process will supply the specified string
if the remote server requires a password as part of the
login process. Note that if this token is present in
the .netrc file, ftp will abort the "auto-login"
process if the .netrc is readable by anyone besides the
user.
account string
Supply an additional account password. If this token
is present, the "auto-login" process will supply the
specified string if the remote server requires an
additional account password, or the "auto-login"
process will initiate an ACCT command if it does not.
macdef name
Define a macro. This token functions like the ftp
macdef command functions. A macro is defined with the
specified name; its contents begin with the next .netrc
line and continue until a null line (consecutive new-
line characters) is encountered. If a macro named init
is defined, it is automatically executed as the last
step in the "auto-login" process.
SEE ALSO
csh(1).
ftpd(1M) in the UMAX V Administrator's Reference Manual.
BUGS
Correct execution of many commands depends upon proper
behavior by the remote server.
An error in the treatment of carriage returns in the 4.2BSD
UNIX ASCII-mode transfer code has been corrected. This
correction may result in incorrect transfers of binary files
to and from 4.2BSD servers using the ascii type. Avoid this
problem by using the binary image type.
APPENDIX L: telnet COMMANDS REFERENCE
NAME
telnet - user interface to the TELNET protocol
SYNOPSIS
telnet [ host [ port ] ]
DESCRIPTION
The telnet command communicates with another host using the
TELNET protocol. If telnet is invoked without arguments, it
enters command mode, indicated by its prompt (for example,
telnet>). In this mode, it accepts and executes the
commands listed below. If it is invoked with arguments, it
performs an open command (see below) with those arguments.
Once a connection has been opened, telnet enters input mode.
The input mode entered will be either character at a time or
line by line depending on what the remote system supports.
In character at a time mode, most text typed is immediately
sent to the remote host for processing.
In line by line mode, all text is echoed locally, and
(normally) only completed lines are sent to the remote host.
The local echo character (initially ^E) may be used to turn
off and on the local echo (this would mostly be used to
enter passwords without the password being echoed).
In either mode, if the localchars toggle is TRUE (the
default in line mode; see below), the user's quit, intr, and
flush characters are trapped locally, and sent as TELNET
protocol sequences to the remote side. There are options
(see toggle autoflush and toggle autosynch below) which
cause this action to flush subsequent output to the terminal
(until the remote host acknowledges the TELNET sequence) and
flush previous terminal input (in the case of quit and
intr).
While connected to a remote host, telnet command mode may be
entered by typing the telnet escape character (initially
^]). When in command mode, the normal terminal editing
conventions are available.
COMMANDS
The following commands are available. Only enough of each
command to uniquely identify it need be typed (this is also
true for arguments to the mode, set, toggle, and display
commands).
open host [ port ]
Open a connection to the named host. If no port
number is specified, telnet attempts to contact a
TELNET server at the default port. The host
specification can be either a host name (see
hosts(4)) or an Internet address specified in "dot
notation" (see inet(3N)).
close Close a TELNET session and return to command mode.
quit Close any open TELNET session and exit telnet. An
end-of-file (in command mode) will also close a
session and exit.
<ctrl>Z Suspend telnet. This command only works when the
user is using the csh(1) or the BSD application
environment version of ksh(1).
status Show the current status of telnet. This includes
the peer one is connected to, as well as the
current mode.
display [ argument ... ]
Displays all, or some, of the set and toggle values
(see below).
? [ command ]
Get help. With no arguments, telnet prints a help
summary. If a command is specified, telnet will
print the help information for just that command.
send arguments
Sends one or more special character sequences to
the remote host. The following are the arguments
which may be specified (more than one argument may
be specified at a time):
escape
Sends the current telnet escape character
(initially ^]).
synch
Sends the TELNET SYNCH sequence. This
sequence causes the remote system to discard
all previously typed (but not yet read) input.
This sequence is sent as TCP urgent data (and
may not work if the remote system is a 4.2 BSD
system -- if it doesn't work, a lower case r
may be echoed on the terminal).
brk
Sends the TELNET BRK (Break) sequence, which
may have significance to the remote system.
ip
Sends the TELNET IP (Interrupt Process)
sequence, which should cause the remote system
to abort the currently running process.
ao
Sends the TELNET AO (Abort Output) sequence,
which should cause the remote system to flush
all output from the remote system to the
user's terminal.
ayt
Sends the TELNET AYT (Are You There) sequence,
to which the remote system may or may not
choose to respond.
ec
Sends the TELNET EC (Erase Character)
sequence, which should cause the remote system
to erase the last character entered.
el
Sends the TELNET EL (Erase Line) sequence,
which should cause the remote system to erase
the line currently being entered.
ga
Sends the TELNET GA (Go Ahead) sequence, which
likely has no significance to the remote
system.
nop
Sends the TELNET NOP (No operation) sequence.
?
Prints out help information for the send
command.
set argument value
Set any one of a number of telnet variables to a
specific value. The special value off turns off
the function associated with the variable. The
values of variables may be interrogated with the
display command. The variables which may be
specified are:
echo
This is the value (initially ^E) which, when
in line by line mode, toggles between doing
local echoing of entered characters (for
normal processing), and suppressing echoing of
entered characters (for entering, say, a
password).
escape
This is the telnet escape character (initially
^[) which causes entry into telnet command
mode (when connected to a remote system).
interrupt
If telnet is in localchars mode (see toggle
localchars below) and the interrupt character
is typed, a TELNET IP sequence (see send ip
above) is sent to the remote host. The
initial value for the interrupt character is
taken to be the terminal's intr character.
quit
If telnet is in localchars mode (see toggle
localchars below) and the quit character is
typed, a TELNET BRK sequence (see send brk
above) is sent to the remote host. The
initial value for the quit character is taken
to be the terminal's quit character.
flushoutput
If telnet is in localchars mode (see toggle
localchars below) and the flushoutput
character is typed, a TELNET AO sequence (see
send ao above) is sent to the remote host.
The initial value for the flush character is
taken to be the terminal's flush character.
erase
If telnet is in localchars mode (see toggle
localchars below), and if telnet is operating
in character at a time mode, then when this
character is typed, a TELNET EC sequence (see
send ec above) is sent to the remote system.
The initial value for the erase character is
taken to be the terminal's erase character.
kill
If telnet is in localchars mode (see toggle
localchars below), and if telnet is operating
in character at a time mode, then when this
character is typed, a TELNET EL sequence (see
send el above) is sent to the remote system.
The initial value for the kill character is
taken to be the terminal's kill character.
eof
If telnet is operating in line by line mode,
entering this character as the first character
on a line will cause this character to be sent
to the remote system. The initial value of
the eof character is taken to be the
terminal's eof character.
toggle arguments ...
Toggle (between TRUE and FALSE) various flags that
control how telnet responds to events. More than
one argument may be specified. The state of these
flags may be interrogated with the display command.
Valid arguments are:
localchars
If this is TRUE, then the flush, interrupt,
quit, erase, and kill characters (see set
above) are recognized locally, and transformed
into (hopefully) appropriate TELNET control
sequences (respectively ao, ip, brk, ec, and
el; see send above). The initial value for
this toggle is TRUE in line by line mode, and
FALSE in character at a time mode.
autoflush
If autoflush and localchars are both TRUE,
then when the ao, intr, or quit characters are
recognized (and transformed into TELNET
sequences; see set above for details), telnet
refuses to display any data on the user's
terminal until the remote system acknowledges
(via a TELNET Timing Mark option) that it has
processed those TELNET sequences. The initial
value for this toggle is TRUE if the terminal
user had not done an stty noflsh, otherwise
FALSE (see stty(1)).
autosynch
If autosynch and localchars are both TRUE,
then when either the intr or quit characters
is typed (see set above for descriptions of
the intr and quit characters), the resulting
TELNET sequence sent is followed by the TELNET
SYNCH sequence. This procedure should cause
the remote system to begin throwing away all
previously typed input until both of the
TELNET sequences have been read and acted
upon. The initial value of this toggle is
FALSE.
crmod
Toggle carriage return mode. When this mode
is enabled, most carriage return characters
received from the remote host will be mapped
into a carriage return followed by a line
feed. This mode does not affect those
characters typed by the user, only those
received from the remote host. This mode is
not very useful unless the remote host only
sends carriage return, but never line feed.
The initial value for this toggle is FALSE.
debug
Toggles socket level debugging (useful only to
the super-user). The initial value for this
toggle is FALSE.
options
Toggles the display of some internal telnet
protocol processing (having to do with TELNET
options). The initial value for this toggle
is FALSE.
netdata
Toggles the display of all network data (in
hexadecimal format). The initial value for
this toggle is FALSE.
?
Displays the legal toggle commands.
SEE ALSO
csh(1), ksh(1), rlogin(1N).
inet(3N), services(4), hosts(4) in the UMAX V Programmer's
Reference Manual.
telenetd(1M) in the UMAX V Administrator's Reference Manual.
BUGS
There is no adequate way for dealing with flow control.
On some remote systems, echo has to be turned off manually
when in line by line mode.
There is enough settable state to justify a .telnetrc file.
No capability for a .telnetrc file is provided.
In line by line mode, the terminal's eof character is only
recognized (and sent to the remote system) when it is the
first character on a line.
APPENDIX M: domax1 AND domax0 HARDWARE CONFIGURATION
??
?Cassette ?
? Drive ?
? ?
?
?
?? ? Disk ? ? Disk ?
? ? Drive ? ? Drive ?
? ? ? ? ?
?
??
?
? Tape
??
? Drive ? ? ?
? ? 4 X 2 MIP
? ? ?
? Tape ? ? Multimax 310
? Drive
?? ?
? ?
?
? ? Port ?
? ?
? ? Selector ?
?
? Console ? ? ?
?
? ? Hardcopy ?
?
? ? Console ? ? ? ? ? ? ? ? 32 Lines ? ? ?
?
?
? ? CRT ? ? ?
?
? ? Annex 01 ?
? ? ?
?
?
Ethernet
?
? Annex 00 ?
? ?
?
? mtlzr ? ? mt_600 ?
? ? ? ?
NOTES
??
APPENDIX N: BASIC UNIX REVIEW
Write the letter(s) of the UNIX component that best fit each
description.
K = Kernel S = Shell U = Utilities D = Directory
_____ 1. Uses standard syntax for all commands.
_____ 2. Schedules tasks and manages data storage.
_____ 3. Memory resident code.
_____ 4. Main interface between UNIX and users.
_____ 5. Heart of the operating system.
_____ 6. Can be easily combined to perform the exact
function which the user desires.
_____ 7. Path name concept.
_____ 8. Written mostly in the "C" programming language.
_____ 9. Multi-level directory structure.
_____ 10. Uses pipes and filters.
_____ 11. Supports control structures.
_____ 12. Includes text processing, electronic mail, file
manipulation, and program generation.
NOTES
??
INDEX
. (dot)..................................................................................63
.. (dot dot).............................................................................63
Access modes.............................................................................37
Annex Commands
call..............................................................................16
hangup............................................................................21
BourneShell prompt........................................................................6
BSD UNIX..................................................................................2
Current working directory................................................................63
Expiration period........................................................................19
FTP Commands............................................................................108
!................................................................................116
?................................................................................123
cd...............................................................................119
close............................................................................121
get remote-file..................................................................113
help.............................................................................123
lcd..............................................................................115
ls...............................................................................120
open host........................................................................109
Password.........................................................................110
put..............................................................................117
quit.............................................................................122
status...........................................................................124
Kernel...................................................................................33
KornShell.................................................................................2
Mailx Commands...........................................................................74
?.................................................................................82
d.................................................................................80
S.............................................................................77, 78
MICOM....................................................................................14
Number links.............................................................................37
On-line manual pages.....................................................................25
Ownership and group affiliation..........................................................37
Parent...................................................................................64
Password.................................................................................19
Pathname.................................................................................57
PROCOMM+.................................................................................14
Protections..............................................................................34
Redirection..........................................................................94, 95
Root directory............................................................................4
Scrolling................................................................................10
Shell.....................................................................................1
Standard input...........................................................................93
Standard output..........................................................................93
Subdirectory.............................................................................61
System V UNIX.............................................................................2
TAB.....................................................................................153
TCP/IP..................................................................................107
Terminal nodes............................................................................3
UMAX.....................................................................................19
UNIX Commands
assist...........................................................................151
cancel............................................................................48
cat...............................................................................40
cd................................................................................61
chmod.............................................................................35
cp............................................................................49, 50
exit..............................................................................20
file..............................................................................39
lp................................................................................45
lpstat............................................................................47
ls................................................................................37
mkdir.............................................................................58
mv................................................................................62
pg................................................................................42
pwd...............................................................................57
rmdir.............................................................................59
tail..............................................................................43
UNIX filesystem...........................................................................3
UNIX Keyboard Function Commands
#..................................................................................9
@..................................................................................9
Ctrl-D............................................................................20
Ctrl-Q............................................................................10
Ctrl-S............................................................................10
Delete............................................................................10
Hold Screen.......................................................................10
UNIX Primer Plus........................................................................153
vi Commands
:!shell-cmd......................................................................147
:q!..............................................................................145
:r !shell-cmd....................................................................147
:r filename......................................................................147
:w...............................................................................145
:w newfile.......................................................................147
:wq..............................................................................146
Wildcards...............................................................................100