|
|
1.1 ! root 1: .TH XNSFTP 1 Cornell ! 2: .\" $Header: xnsftp.n,v 1.5 87/04/01 13:56:53 ed Exp $ ! 3: .UC 4 ! 4: .SH NAME ! 5: xnsftp \- file transfer program ! 6: .SH SYNOPSIS ! 7: .B ftp ! 8: [ ! 9: .B \-v ! 10: ] [ ! 11: .B \-d ! 12: ] [ ! 13: .B \-i ! 14: ] [ ! 15: .B \-g ! 16: ] [ ! 17: .B \-F ! 18: ] [ ! 19: .B "\-c commands" ! 20: ] [ ! 21: .B host ! 22: ] ! 23: .SH DESCRIPTION ! 24: .I Xnsftp ! 25: is a user interface to the XNS Courier FilingSubset and Filing protocols. ! 26: The program allows a user to transfer files to and from a ! 27: remote network site running FilingSubset (version 1) or Filing (version 4) ! 28: server software, typically a Xerox file server. ! 29: .PP ! 30: The server host with which ! 31: .I xnsftp ! 32: is to communicate may be specified on the command line. ! 33: If this is done, ! 34: .I xnsftp ! 35: will immediately attempt to establish a connection to a Filing ! 36: server on that host; otherwise, ! 37: .I xnsftp ! 38: will enter its command interpreter and await instructions ! 39: from the user. When ! 40: .I xnsftp ! 41: is awaiting commands from the user the prompt \*(lqxnsftp>\*(rq ! 42: is provided the user. The following commands are recognized ! 43: by ! 44: .IR xnsftp : ! 45: .TP ! 46: .B \&! ! 47: Invoke a shell on the local machine. ! 48: .TP ! 49: \fBarchive\fP \fIremote-file\fP [ \fIlocal-file\fP ] ! 50: Serialize the file named in \fIremote-file\fP into \fIlocal-file\fP on the ! 51: local host. If \fIremote-file\fP is a directory, then the directory and all ! 52: descendants will be serialized. The serialized data format will maintain ! 53: both contents and attributes for the file and descendants. Useful for ! 54: \*(lqarchiving\*(rq remote directories. ! 55: .TP ! 56: \fBappend\fP \fIlocal-file\fP [ \fIremote-file\fP ] ! 57: Not yet implemented! ! 58: Append a local file to a file on the remote machine. ! 59: If ! 60: .I remote-file ! 61: is left unspecified, the local file name is used in naming the ! 62: remote file. File transfer uses the current setting ! 63: .IR type . ! 64: .TP ! 65: .B ascii ! 66: Set the file transfer ! 67: .I type ! 68: to network ASCII. This type is appropriate for ! 69: transferring 7-bit ascii text files. ! 70: Files stored using this transfer type are given the Filing attribute ! 71: tText. ! 72: .TP ! 73: .B bell ! 74: Arrange that a bell be sounded after each file transfer ! 75: command is completed. ! 76: .TP ! 77: .B binary ! 78: Set the file transfer ! 79: .I type ! 80: to support binary image transfer. ! 81: This is the appropriate type for transferring 8-bit binary data, e.g. Interlisp ! 82: DCOM files or XDE BCD files. ! 83: Files stored using this transfer type are given the Filing type attribute ! 84: tUnspecified. ! 85: .TP ! 86: .B bye ! 87: Terminate the FTP session with the remote server ! 88: and exit ! 89: .IR xnsftp . ! 90: .TP ! 91: .BI cd " remote-directory" ! 92: Change the working directory on the remote machine ! 93: to ! 94: .IR remote-directory . ! 95: .TP ! 96: .B close ! 97: Terminate the FTP session with the remote server, and ! 98: return to the command interpreter. ! 99: .TP ! 100: \fBcopy\fP [ \fIfrom\fP ] [ \fIto\fP ] ! 101: Copy the file \fIfrom\fP to the file \fIto\fP on the remote machine. If \fIfrom\fP ! 102: is a directory, a copy of the directory and its contents will be made. If \fIto\fP ! 103: specifies a file, the resulting copy will have that name. If \fIto\fP ! 104: is a directory, a copy with the same name as the original will be made in ! 105: the directory specified by \fIto\fP. ! 106: .I Copy ! 107: will not implicitly create directories; therefore, any directories specified ! 108: in \fIto\fP must already exist. ! 109: The \fIcopy\fP command is not available when the session is using the ! 110: FilingSubset protocol. ! 111: .TP ! 112: .BI delete " remote-file" ! 113: Delete the file ! 114: .I remote-file ! 115: on the remote machine. ! 116: If the remote file is a directory a confirmation will be required. ! 117: .TP ! 118: \fBdebug\fP [ \fIdebug-value\fP ] ! 119: Toggle debugging mode. If an optional ! 120: .I debug-value ! 121: is specified it is used to set the debugging level. ! 122: .TP ! 123: \fBdir\fP [ \fIremote-directory\fP ] [ \fIlocal-file\fP ] ! 124: Print a listing of the directory contents in the ! 125: directory, ! 126: .IR remote-directory , ! 127: and, optionally, place the output in ! 128: .IR local-file . ! 129: If no directory is specified, the current working ! 130: directory on the remote machine is used. If no local ! 131: file is specified, output comes to the terminal. ! 132: .TP ! 133: \fBget\fP \fIremote-file\fP [ \fIlocal-file\fP ] ! 134: Retrieve the ! 135: .I remote-file ! 136: and store it on the local machine. If the local ! 137: file name is not specified, it is given the same ! 138: name it has on the remote machine. ! 139: The current setting for ! 140: .I type ! 141: is used while transferring the file. ! 142: .TP ! 143: .B guess ! 144: Determine the type of the file being transferred either by examining the ! 145: contents (\fIput\fP) or by querying the remote service (\fIget\fP). This ! 146: type will then be used for determining if a conversion of content should ! 147: occur during file transfer and also specify the file type to be retained on ! 148: the service, during a \fIput\fP. This is the default type and is appropriate ! 149: for most file transfers. A file type may be forced to be of a given type by ! 150: using one of the ! 151: .IR ascii , ! 152: .I binary ! 153: or ! 154: .I type ! 155: commands. A \fIput\fP command can currently distinguish between ! 156: .IR ascii , ! 157: .IR binary , ! 158: .I interpress ! 159: and ! 160: .IR vpcanvas (res) ! 161: file types. [\fINote\fP: the file type used may impose a translation ! 162: of contents during transfer, see \fIFILE TRANSFER PARAMETERS\fP]. ! 163: .TP ! 164: \fBhash\fP ! 165: Toggle hash-sign (``#'') printing for each data block ! 166: transferred. Data blocks vary depending on implementation, but ! 167: are typically 534 bytes long. ! 168: .TP ! 169: .B glob ! 170: Toggle file name globbing. With file name globbing enabled, ! 171: each local file or pathname is processed for ! 172: .IR csh (1) ! 173: metacharacters. These characters include ``*?[]~{}''. ! 174: Remote files specified in mutliple item commands, e.g. ! 175: .IR mput , ! 176: are globbed by the remote server. With globbing disabled ! 177: all files and pathnames are treated literally. ! 178: .TP ! 179: \fBhelp\fP [ \fIcommand\fP ] ! 180: Print an informative message about the meaning of ! 181: .IR command . ! 182: If no argument is given, ! 183: .I xnsftp ! 184: prints a list of the known commands. ! 185: .TP ! 186: \fBlcd\fP [ \fIdirectory\fP ] ! 187: Change the working directory on the local machine. If ! 188: no ! 189: .I directory ! 190: is specified, the user's home directory is used. ! 191: .TP ! 192: \fBls\fP [ \fIremote-directory\fP ] [ \fIlocal-file\fP ] ! 193: Print an abbreviated listing (containing remote path names) of the contents of a ! 194: directory on the remote machine. If ! 195: .I remote-directory ! 196: is left unspecified, the current working directory ! 197: is used. If no local file is specified, the output ! 198: is sent to the terminal. ! 199: .TP ! 200: \fBmdelete\fP \fIremote-files\fP ! 201: Delete the specified files on the remote machine. If globbing ! 202: is enabled, the specification of remote files will first be ! 203: expanded using ! 204: .IR ls . ! 205: .TP ! 206: \fBmdir\fP \fIremote-files\fP \fIlocal-file\fP ! 207: Obtain a directory listing of multiple files on the remote ! 208: machine and place the result in ! 209: .IR local-file . ! 210: .TP ! 211: \fBmget\fP \fIremote-files\fP ! 212: Retrieve the specified files from the remote machine and ! 213: place them in the current local directory. If globbing ! 214: is enabled, the specification of remote files will first be ! 215: expanding using ! 216: .IR ls . ! 217: The local file names will be identical with the name attribute of ! 218: the remote file names i.e. with the last component of the remote pathname. ! 219: .TP ! 220: \fBmkdir\fP \fIdirectory-name\fP ! 221: Make a directory on the remote machine. ! 222: .TP ! 223: \fBmls\fP \fIremote-files\fP \fIlocal-file\fP ! 224: Obtain an abbreviated listing of multiple files on the remote ! 225: machine and place the result in ! 226: .IR local-file . ! 227: .TP ! 228: \fBmove\fP [ \fIfrom\fP ] [ \fIto\fP ] ! 229: Move the file \fIfrom\fP ! 230: to the file \fIto\fP on the remote machine. If \fIfrom\fP ! 231: is a directory, the directory and its contents will be moved. If \fIto\fP ! 232: specifies a file, the file will be renamed during the move. If \fIto\fP ! 233: is a directory, the resulting file will have the same name as the original. ! 234: .I move ! 235: will not implicitly create directories; therefore, any directories specified ! 236: in \fIto\fP must already exist. ! 237: The \fImove\fP command is not available when the session is using the ! 238: FilingSubset protocol. ! 239: .TP ! 240: \fBmput\fP \fIlocal-files\fP ! 241: Transfer multiple local files from the current local directory ! 242: to the current working directory on the remote machine. ! 243: .TP ! 244: \fBopen\fP [\fB-F\fP] \fIhost\fP [ \fIport\fP ] ! 245: Establish a Courier connection to the specified ! 246: .I host ! 247: Filing server. ! 248: Note that ! 249: .I host ! 250: must be the Clearinghouse name of a Filing server, e.g. ! 251: \*(lqcornellfs1:computer\ science:cornell-univ\*(rq; if the domain ! 252: and organization components of the name are not specified, they default ! 253: to the local domain and organization. ! 254: Unless auto-login has been disabled, ! 255: .I Xnsftp ! 256: will also attempt to automatically log the user in to ! 257: the Filing server (see \*(lquser\*(rq below). The \fB-F\fP option allows the ! 258: Filing Protocol to be used instead of the FilingSubset protocol when logging ! 259: onto the service. ! 260: .TP ! 261: .B prompt ! 262: Toggle interactive prompting. Interactive prompting ! 263: occurs during multiple file transfers to allow the ! 264: user to selectively retrieve or store files. If ! 265: prompting is turned off (default), any ! 266: .I mget ! 267: or ! 268: .I mput ! 269: will transfer all files. ! 270: .TP ! 271: \fBput\fP \fIlocal-file\fP [ \fIremote-file\fP ] ! 272: Store a local file on the remote machine. If ! 273: .I remote-file ! 274: is left unspecified, the local file name is used ! 275: in naming the remote file. File transfer uses the ! 276: current setting for ! 277: .IR type . ! 278: .TP ! 279: .B pwd ! 280: Print the name of the current working directory on the remote ! 281: machine. ! 282: .TP ! 283: .B quit ! 284: A synonym for bye. ! 285: .TP ! 286: \fBrename\fP [ \fIfrom\fP ] [ \fIto\fP ] ! 287: Rename the file \fIfrom\fP on the remote machine, to the file \fIto\fP. ! 288: If \fIto\fP includes a directory specification, the action taken will ! 289: be identical to the \fImove\fP command. If no directory specification is ! 290: given, then \fIto\fP will be created in the same directory as \fIfrom\fP. ! 291: .I Rename ! 292: will not implicitly create directories; therefore, any directories specified ! 293: in \fIto\fP must already exist. ! 294: The \fIrename\fP command is not available when the session is using the ! 295: FilingSubset protocol. ! 296: .TP ! 297: \fBrestore\fP \fIlocal-file\fP [ \fIremote-file\fP ] ! 298: Deserialize the file named in \fIrlocal-file\fP into \fIremote-file\fP on the ! 299: remote service. If the contents of \fIlocal-file\fP includes a directory, ! 300: then the directory and all ! 301: descendants will be deserialized. The serialized data format will maintain ! 302: both contents and attributes for the file and descendants. Used in ! 303: conjunction with \fIarchive\fP.. ! 304: .TP ! 305: .BI rmdir " directory-name" ! 306: Delete a directory on the remote machine. ! 307: .TP ! 308: \fBsend\fP \fIlocal-file\fP [ \fIremote-file\fP ] ! 309: A synonym for put. ! 310: .TP ! 311: .B status ! 312: Show the current status of ! 313: .IR xnsftp . ! 314: .TP ! 315: .B trace ! 316: Toggle packet tracing. ! 317: .TP ! 318: \fBtype\fP [ \fItype-name\fP ] ! 319: Set the file transfer ! 320: .I type ! 321: to ! 322: .IR type-name . ! 323: If no type is specified, the current type ! 324: is printed. The default type is \*(lq\fIguess\fP\*(rq, where xnsftp will ! 325: attempt to determine the type from the file being transferred. ! 326: .I "Type-name" ! 327: may specify one of the following file types ! 328: .IR ascii , ! 329: .IR binary , ! 330: .IR guess , ! 331: .IR viewpoint "(Viewpoint document)," ! 332: .IR interpress , ! 333: .IR vpcanvas "(res)," ! 334: .IR vpdictionary , ! 335: .IR vpmailnote , ! 336: .IR vpreference , ! 337: .IR serialized (tSerialized) ! 338: or ! 339: .IR value , ! 340: a decimal number which is the numeric value for the type of the file ! 341: (i.e., 7 for tAsciiText). [\fINote\fP: the Viewpoint file types ! 342: .IR viewpoint , ! 343: .IR vpdictionary , ! 344: .I vpmailnote ! 345: and ! 346: .I vpreference ! 347: will only set the type attribute ! 348: of the file. Their use does not guarantee interoperability with Viewpoint at ! 349: this time since essential file attributes are not maintained when the file is ! 350: transferred to a Unix system.] ! 351: .TP ! 352: \fBunify\fP \fIdirectory\fP ! 353: Unify the access lists for \fIdirectory\fP and all descendants. ! 354: .TP ! 355: \fBuser\fP \fIuser-name\fP [ \fIpassword\fP ] ! 356: Identify yourself to the remote Filing server. If the ! 357: password is not specified, ! 358: .I xnsftp ! 359: will prompt the user for it (after disabling local echo). ! 360: Unless ! 361: .I xnsftp ! 362: is invoked with \*(lqauto-login\*(rq disabled, this ! 363: process is done automatically on initial connection to ! 364: the Filing server. ! 365: The user name should be a standard XNS Clearinghouse name or alias, e.g. ! 366: \*(lqj.q.\ johnson:computer\ science:cornell-univ\*(rq; if the domain ! 367: and organization components of the name are not specified, they default ! 368: to the local domain and organization. ! 369: .PP ! 370: If \*(lqauto-login\*(rq is used, credentials are determined either from ! 371: the environment variables XNSNAME and XNSPASSWD or, if not defined, by ! 372: prompting the user. ! 373: .TP ! 374: .B verbose ! 375: Toggle verbose mode. In verbose mode, all responses from ! 376: the Filing server are displayed to the user. In addition, ! 377: if verbose is on, when a file transfer completes, statistics ! 378: regarding the efficiency of the transfer are reported. By default, ! 379: verbose is on. ! 380: .TP ! 381: \fBwhatis\fP \fIlocal-file\fP ! 382: Make an educated guess as to the type of the file identified by ! 383: \fIlocal-file\fP by examining the contents of the file. ! 384: This is the determined type which would be used if the ! 385: .I guess ! 386: type is in effect when transferring the file to the file service. If the user ! 387: wishes to transfer the file as a different type, the appropriate ! 388: .IR ascii , ! 389: .I binary ! 390: or ! 391: .I type ! 392: command should be used prior to transferring the file. ! 393: .TP ! 394: \fB?\fP [ \fIcommand\fP ] ! 395: A synonym for help. ! 396: .PP ! 397: Command arguments which have embedded spaces may be quoted with ! 398: quote (") marks. ! 399: .PP ! 400: .SH "FILE NAMING CONVENTIONS" ! 401: Files specified as arguments to ! 402: .I xnsftp ! 403: commands are processed according to the following rules. ! 404: .TP ! 405: 1) ! 406: If the file name \*(lq\-\*(rq is specified, the ! 407: .B stdin ! 408: (for reading) or ! 409: .B stdout ! 410: (for writing) is used. ! 411: .TP ! 412: 2) ! 413: If the first character of the file name is \*(lq|\*(rq, the ! 414: remainder of the argument is interpreted as a shell command. ! 415: .I Xnsftp ! 416: then forks a shell, using ! 417: .IR popen (3) ! 418: with the argument supplied, and reads (writes) from the stdout ! 419: (stdin). If the shell command includes spaces, the argument ! 420: must be quoted; e.g. \*(lq"| ls -lt"\*(rq. A particularly ! 421: useful example of this mechanism is: \*(lqdir |more\*(rq. ! 422: .TP ! 423: 3) ! 424: Failing the above checks, if ``globbing'' is enabled, ! 425: local file names are expanded ! 426: according to the rules used in the ! 427: .IR csh (1); ! 428: c.f. the ! 429: .I glob ! 430: command. ! 431: .TP ! 432: 4) ! 433: Remote file names whose first character is \*(lq/\*(rq (slash) are interpreted ! 434: as absolute pathnames. Other remote file names are interpreted as pathnames ! 435: relative to the current connected directory. ! 436: .SH "FILE TRANSFER PARAMETERS" ! 437: A \fItype\fP attribute is maintained by the service once a file is stored and ! 438: may be determined by listing the file via the \fIdir\fP command. ! 439: .I Xnsftp ! 440: allows the type of file being transferred to be determined from the content ! 441: of the file (\fIput\fP), from the file service (\fIget\fP) or explicitly ! 442: overridden by the user (\fIascii\fP, \fIbinary\fP or \fItype\fP). ! 443: .PP ! 444: By default, ! 445: .I xnsftp ! 446: will attempt the discern the type of the local file when storing a file ! 447: on a remote service. Currently, the types ! 448: .IR ascii , ! 449: .IR binary , ! 450: .I interpress ! 451: and ! 452: .IR vpcanvas "(res)" ! 453: can be determined by examining the contents of the file. A user can override ! 454: this \*(lqguessed\*(rq type or set a type explicitly through the use of the ! 455: .IR ascii , ! 456: .I binary ! 457: or ! 458: .I type ! 459: commands. The ! 460: .I type ! 461: command allows specification of several common Filing and Viewpoint defined ! 462: file types (\fIascii\fP(tText), ! 463: .IR binary "(tUnspecified)," ! 464: .IR serialized "(tSerialized)," ! 465: .IR viewpoint "(Viewpoint document)," ! 466: .IR interpress , ! 467: .IR vpcanvas "(res)," ! 468: .IR vpdictionary , ! 469: .IR vpmailnote or ! 470: .IR vpreference ) ! 471: as well as specification of a decimal value for file types not included in ! 472: this list. ! 473: .PP ! 474: When retrieving files from a remote service, the file type is not retained ! 475: locally. However, ! 476: .I xnsftp ! 477: may query the service for the file type, since it may affect the actual ! 478: file transfer. Once again, the user may override the type with one of the ! 479: above type-setting commands. ! 480: .PP ! 481: For some file types it is appropriate to convert the file between ! 482: \*(lqnetwork format\*(rq and Unix standard format; therefore the \fItype\fP ! 483: of a file being transferred may directly affect the transfer of ! 484: the contents of that file to or from a remote service. ! 485: In particular, it is generally appropriate to use ! 486: the following translation when transferring files of type \fIascii\fP or ! 487: \fIvpmailnote\fP: Unix EOL characters ! 488: (\\n) are translated to and from Xerox EOL characters (\\r), Xerox left ! 489: arrow characters are translated to underscore, etc. All other values for ! 490: .I type ! 491: imply no translation will take place during file transfer. For files of the ! 492: types supported by ! 493: .I xnsftp, the default transfer type of \fIguess\fP will perform the ! 494: correct translation. Specification of a parameter other than \fIguess\fP on ! 495: the \fItype\fP command can be used to force or inhibit a translation as ! 496: necessary. ! 497: .PP ! 498: Although several Viewpoint related types are indeed allowed on the \fItype\fP ! 499: command, use of these files within Viewpoint is not guaranteed since essential ! 500: attributes expected by Viewpoint are not maintained when a file is transferred ! 501: to a Unix system with ! 502: .IR xnsftp . ! 503: .SH OPTIONS ! 504: Options may be specified at the command line, or to the ! 505: command interpreter. ! 506: .PP ! 507: The ! 508: .B \-v ! 509: (verbose on) option forces ! 510: .I xnsftp ! 511: to show all responses from the remote server, as well ! 512: as report on data transfer statistics. ! 513: .PP ! 514: The ! 515: .B \-n ! 516: option restrains ! 517: .I xnsftp ! 518: from attempting \*(lqauto-login\*(rq upon initial connection. ! 519: .PP ! 520: The ! 521: .B \-i ! 522: option turns off interactive prompting during ! 523: mutliple file transfers. ! 524: .PP ! 525: The ! 526: .B \-d ! 527: option enables debugging. ! 528: .PP ! 529: The ! 530: .B \-g ! 531: option disables file name globbing. ! 532: .PP ! 533: The ! 534: .B \-c ! 535: option allows a list of commands to be passed directly to \fIxnsftp\fP. The ! 536: list is a sequence of commands separated by semi-colons (;). If a semi-colon ! 537: follows the last command in the list, \fIxnsftp\fP will enter prompt mode ! 538: following the execution of the command sequence. This provides a simple ! 539: command-line interface to \fIxnsftp\fP for use by other programs. For example, ! 540: to list all files in the directory \*(lqpublic\*(rq on FS1, the following ! 541: command could be used: ! 542: .nf ! 543: xnsftp -c "dir /public/*" FS1 ! 544: .fi ! 545: .PP ! 546: The ! 547: .B \-F ! 548: option allows the Filing Protocol to be used instead of the FilingSubset ! 549: Protocol. This allows ! 550: .I xnsftp ! 551: to be used with existing Xerox file services and enables use of the ! 552: .IR copy , ! 553: .I move ! 554: and ! 555: .I rename ! 556: commands. ! 557: .SH NOTES ! 558: .I Xnsftp ! 559: will attempt to use the FilingSubset Protocol when establishing a session ! 560: with a remote file service. To assure compatibility with Xerox file servers ! 561: which are currently running Filing Protocol (version 4), ! 562: .I xnsftp ! 563: will attempt to use Filing when the intended service rejects the FilingSubset ! 564: connection. If the connection is established under this request, the use of ! 565: Filing will be identical to that of the FilingSubset and therefore transparent ! 566: to the user (with the exception of the ! 567: .IR copy , ! 568: .I move ! 569: and ! 570: .I rename ! 571: commands which are not available in a FilingSubset session). ! 572: .PP ! 573: The ! 574: .B \-F ! 575: switch may be used to override the use of the FilingSubset Protocol and ! 576: attempt the connection with Filing directly. ! 577: .SH BUGS ! 578: Append is not yet implemented. ! 579: .PP ! 580: Many interesting features of the Filing protocol, e.g. ! 581: remote searches using the Find RPC, are not supported. ! 582: Also, only version 4 of Filing is supported. ! 583: .PP ! 584: Serialization and deserialization is supported to the extent that the stream ! 585: is read from or written to a single local file. At this time, there is no ! 586: convenient way to recreate the structure of a serialized stream locally or ! 587: to serialize a local directory for transfer to a remote service. ! 588: .PP ! 589: There may be pathological cases where ! 590: .I xnsftp ! 591: may not determine the correct type of the file when the \fIguess\fP type is ! 592: in effect. In addition, most but not all files of type tUnspecified should be ! 593: transferred in binary mode when retrieved from a service. In these cases, ! 594: the \fItype\fP command may need to be used to guarantee ! 595: the correct file transfer mode. ! 596: .PP ! 597: Aborting a file ! 598: transfer does not work right; if one attempts this the connection to ! 599: the remote server will likely have to be reopened. ! 600: .PP ! 601: The Filing defined type of tAsciiText format is not implemented yet. ! 602:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.