file reorg, pathnames.h, paths.h
[unix-history] / usr / src / usr.bin / ftp / ftp.1
index ec75a4a..632eefa 100644 (file)
@@ -1,10 +1,21 @@
-.\" Copyright (c) 1985 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1985, 1989 The Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)ftp.1       6.7 (Berkeley) %G%
+.\" Redistribution and use in source and binary forms are permitted
+.\" provided that the above copyright notice and this paragraph are
+.\" duplicated in all such forms and that any documentation,
+.\" advertising materials, and other materials related to such
+.\" distribution and use acknowledge that the software was developed
+.\" by the University of California, Berkeley.  The name of the
+.\" University may not be used to endorse or promote products derived
+.\" from this software without specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\"
-.TH FTP 1C "April 29, 1985"
+.\"    @(#)ftp.1       6.13 (Berkeley) %G%
+.\"
+.TH FTP 1 "March 14, 1989"
 .UC 5
 .SH NAME
 ftp \- ARPANET file transfer program
 .UC 5
 .SH NAME
 ftp \- ARPANET file transfer program
@@ -116,6 +127,10 @@ to
 Change the remote machine working directory to the parent of the
 current remote machine working directory.
 .TP
 Change the remote machine working directory to the parent of the
 current remote machine working directory.
 .TP
+.BI chmod " mode file-name"
+Change the permission modes the file \fIfile-name\fR on the remote
+sytem to \fImode\fR.
+.TP
 .B close
 Terminate the FTP session with the remote server, and
 return to the command interpreter.
 .B close
 Terminate the FTP session with the remote server, and
 return to the command interpreter.
@@ -157,6 +172,12 @@ directory,
 .IR remote-directory ,
 and, optionally, placing the output in
 .IR local-file .
 .IR remote-directory ,
 and, optionally, placing the output in
 .IR local-file .
+If interactive prompting is on,
+.I ftp
+will prompt the user to verify that the last argument is indeed the
+target local file for receiving
+.B dir
+output.
 If no directory is specified, the current working
 directory on the remote machine is used.  If no local
 file is specified, or \fIlocal-file\fP is \fB-\fP,
 If no directory is specified, the current working
 directory on the remote machine is used.  If no local
 file is specified, or \fIlocal-file\fP is \fB-\fP,
@@ -219,6 +240,10 @@ If no argument is given,
 .I ftp
 prints a list of the known commands.
 .TP
 .I ftp
 prints a list of the known commands.
 .TP
+\fBidle\fP [ \fIseconds\fP ]
+Set the inactivity timer on the remote server to \fIseconds\fR seconds.
+If \fIseconds\fR is ommitted, the current inactivity timer is printed.
+.TP
 \fBlcd\fP [ \fIdirectory\fP ]
 Change the working directory on the local machine.  If
 no 
 \fBlcd\fP [ \fIdirectory\fP ]
 Change the working directory on the local machine.  If
 no 
@@ -226,11 +251,22 @@ no
 is specified, the user's home directory is used.
 .TP
 \fBls\fP [ \fIremote-directory\fP ] [ \fIlocal-file\fP ]
 is specified, the user's home directory is used.
 .TP
 \fBls\fP [ \fIremote-directory\fP ] [ \fIlocal-file\fP ]
-Print an abbreviated listing of the contents of a
-directory on the remote machine.  If
+Print a listing of the contents of a
+directory on the remote machine.
+The listing includes any system-dependent information that the server
+chooses to include; for example, most UNIX systems will produce
+output from the command \*(lqls -l\*(rq.
+(See also \fBnlist\fP.)
+If
 .I remote-directory
 .I remote-directory
-is left unspecified, the current working directory
-is used.  If no local file is specified, or if \fIlocal-file\fR is \fB-\fR,
+is left unspecified, the current working directory is used.
+If interactive prompting is on,
+.I ftp
+will prompt the user to verify that the last argument is indeed the
+target local file for receiving
+.B ls
+output.
+If no local file is specified, or if \fIlocal-file\fR is \fB-\fR,
 the output is sent to the terminal.
 .TP
 \fBmacdef\fP \fImacro-name\fP
 the output is sent to the terminal.
 .TP
 \fBmacdef\fP \fImacro-name\fP
@@ -284,7 +320,8 @@ new local directories can be created with `\fB!\fP\ mkdir\ directory'.
 Make a directory on the remote machine.
 .TP
 \fBmls\fP \fIremote-files\fP \fIlocal-file\fP
 Make a directory on the remote machine.
 .TP
 \fBmls\fP \fIremote-files\fP \fIlocal-file\fP
-Like \fBls\fP, except multiple remote files may be specified.
+Like \fBnlist\fP, except multiple remote files may be specified,
+and the \fIlocal-file\fP must be specified.
 If interactive prompting is on,
 .I ftp
 will prompt the user to verify that the last argument is indeed the
 If interactive prompting is on,
 .I ftp
 will prompt the user to verify that the last argument is indeed the
@@ -299,6 +336,9 @@ to
 .IR mode-name .
 The default mode is \*(lqstream\*(rq mode.
 .TP
 .IR mode-name .
 The default mode is \*(lqstream\*(rq mode.
 .TP
+\fBmodtime\fP \fIfile-name\fP
+Show the last modification time of the file on the remote machine.
+.TP
 \fBmput\fP \fIlocal-files\fP
 Expand wild cards in the list of local files given as arguments
 and do a \fBput\fR for each file in the resulting list.
 \fBmput\fP \fIlocal-files\fP
 Expand wild cards in the list of local files given as arguments
 and do a \fBput\fR for each file in the resulting list.
@@ -309,6 +349,20 @@ and
 .I nmap
 settings.
 .TP
 .I nmap
 settings.
 .TP
+\fBnlist\fP [ \fIremote-directory\fP ] [ \fIlocal-file\fP ]
+Print a  list of the files of a
+directory on the remote machine.  If
+.I remote-directory
+is left unspecified, the current working directory is used.
+If interactive prompting is on,
+.I ftp
+will prompt the user to verify that the last argument is indeed the
+target local file for receiving
+.B nlist
+output.
+If no local file is specified, or if \fIlocal-file\fR is \fB-\fR,
+the output is sent to the terminal.
+.TP
 \fBnmap\fP [ \fIinpattern\fP \fIoutpattern\fP ]
 Set or unset the filename mapping mechanism.
 If no arguments are specified, the filename mapping mechanism is unset.
 \fBnmap\fP [ \fIinpattern\fP \fIoutpattern\fP ]
 Set or unset the filename mapping mechanism.
 If no arguments are specified, the filename mapping mechanism is unset.
@@ -342,7 +396,7 @@ All other characters are treated literally, and are used to determine the
 .B nmap
 .I inpattern
 variable values.
 .B nmap
 .I inpattern
 variable values.
-For exmaple, given
+For example, given
 .I inpattern
 $1.$2 and the remote file name "mydata.data", $1 would have the value
 "mydata", and $2 would have the value "data".
 .I inpattern
 $1.$2 and the remote file name "mydata.data", $1 would have the value
 "mydata", and $2 would have the value "data".
@@ -487,6 +541,10 @@ Request help from the remote FTP server.  If a
 .I command-name
 is specified it is supplied to the server as well.
 .TP
 .I command-name
 is specified it is supplied to the server as well.
 .TP
+\fBremotestatus\fP [ \fIfile-name\fP ]
+With no arguments, show status of remote machine. If \fIfile-name\fP
+is specified, show status of \fIfile-name\fP on remote machine.
+.TP
 \fBrename\fP [ \fIfrom\fP ] [ \fIto\fP ]
 Rename the file
 .I from
 \fBrename\fP [ \fIfrom\fP ] [ \fIto\fP ]
 Rename the file
 .I from
@@ -497,7 +555,7 @@ on the remote machine, to the file
 Clear reply queue.
 This command re-synchronizes command/reply sequencing with the remote
 ftp server.
 Clear reply queue.
 This command re-synchronizes command/reply sequencing with the remote
 ftp server.
-Resynchronization may be neccesary following a violation of the ftp protocol
+Resynchronization may be necessary following a violation of the ftp protocol
 by the remote server.
 .TP
 .BI rmdir " directory-name"
 by the remote server.
 .TP
 .BI rmdir " directory-name"
@@ -540,6 +598,13 @@ PORT commands for each data transfer.  This is useful
 for certain FTP implementations which do ignore PORT
 commands but, incorrectly, indicate they've been accepted.
 .TP
 for certain FTP implementations which do ignore PORT
 commands but, incorrectly, indicate they've been accepted.
 .TP
+.BI site " arg1 arg2 ..."
+The arguments specified are sent, verbatim, to the remote FTP
+server as a SITE command.
+.TP
+.BI size " file-name"
+Return size of \fIfile-name\fP on remote machine.
+.TP
 .B status
 Show the current status of
 .IR ftp .
 .B status
 Show the current status of
 .IR ftp .
@@ -558,6 +623,9 @@ successful completion.
 The remote server will report unique name.
 Default value is off.
 .TP
 The remote server will report unique name.
 Default value is off.
 .TP
+.B system
+Show the type of operating system running on the remote machine.
+.TP
 .B tenex
 Set the file transfer type to that needed to
 talk to TENEX machines.
 .B tenex
 Set the file transfer type to that needed to
 talk to TENEX machines.
@@ -573,6 +641,10 @@ to
 If no type is specified, the current type
 is printed.  The default type is network ASCII.
 .TP
 If no type is specified, the current type
 is printed.  The default type is network ASCII.
 .TP
+\fBumask\fP [ \fInewmask\fP ]
+Set the default umask on the remote server to \fInewmask\fR.
+If \fInewmask\fR is ommitted, the current umask is printed.
+.TP
 \fBuser\fP \fIuser-name\fP [ \fIpassword\fP ] [ \fIaccount\fP ]
 Identify yourself to the remote FTP server.  If the
 password is not specified and the server requires it,
 \fBuser\fP \fIuser-name\fP [ \fIpassword\fP ] [ \fIaccount\fP ]
 Identify yourself to the remote FTP server.  If the
 password is not specified and the server requires it,
@@ -767,8 +839,22 @@ command argument.
 Once a match is made, the subsequent .netrc tokens are processed,
 stopping when the end of file is reached or another
 .B machine
 Once a match is made, the subsequent .netrc tokens are processed,
 stopping when the end of file is reached or another
 .B machine
+or a
+.B default
 token is encountered.
 .TP
 token is encountered.
 .TP
+\fBdefault\fP
+This is the same as \fBmachine\fP \fIname\fP except that \fBdefault\fP
+matches any name.
+There can be only one \fBdefault\fP token, and it must be after all
+\fBmachine\fP tokens.
+This is normally used as:
+.ce
+default login anonymous password user@site
+thereby giving the user \fIautomatic\fP anonymous ftp login to
+machines not specified in \fB.netrc\fP. This can be overridden
+by using the \fB\-n\fP flag to disable auto-login.
+.TP
 \fBlogin\fP \fIname\fP
 Identify a user on the remote machine.
 If this token is present, the auto-login process will initiate
 \fBlogin\fP \fIname\fP
 Identify a user on the remote machine.
 If this token is present, the auto-login process will initiate
@@ -779,7 +865,8 @@ 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.
 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,
+Note that if this token is present in the .netrc file for any user other
+than \fIanonymous\fP,
 .I ftp
 will abort the auto-login process if the .netrc is readable by
 anyone besides the user.
 .I ftp
 will abort the auto-login process if the .netrc is readable by
 anyone besides the user.
@@ -804,6 +891,8 @@ If a macro named
 .I init
 is defined, it is automatically executed as the last step in the
 auto-login process.
 .I init
 is defined, it is automatically executed as the last step in the
 auto-login process.
+.SH "SEE ALSO"
+ftpd(8)
 .SH BUGS
 Correct execution of many commands depends upon proper behavior
 by the remote server.
 .SH BUGS
 Correct execution of many commands depends upon proper behavior
 by the remote server.