Previous     Contents     Index          Next     
iPlanet Partner Agent for ECXpert Server Site Administrator’s Handbook



Appendix B   (Optional) Using the Partner Agent Server Command Line Client

Partner Agent Server Command Line Client optionally can be used to test that Partner Agent Server is transferring files properly to ECXpert or to another machine. Typically, Partner Agent Windows Client is used for transferring files to ECXpert or another machine.

This appendix describes how to start the Partner Agent Server Command Line Client, the options and commands available, and how to transfer files non-interactively via a shell script.

The following topics are discussed in this section:

The Partner Agent Server Command Line Client

The Partner Agent Server Command Line Client can securely transfer files to ECXpert or to another machine using the FTP protocol, as the Windows Client does, in addition to the HTTP, and HTTPS protocols. It can be used interactively, or it can be called as part of a program or script.

Partner Agent Server Command Line Client is installed as part of the Partner Agent Server installation process. It is located, by default, in the $NSBASE/NS-apps/paserver/bin/ directory, where $NSBASE/NS-apps/paserver is the base directory that houses all of the components of Partner Agent Server.

Starting Partner Agent Server Command Line Client Interactively

To start the Command Line Client and immediately establish a connection to another machine, follow these steps:

  1. Set environment variables for your certificate and private key.


  2. The Partner Agent Servers are pre-configured to expect a certificate-based login. In order to send the correct certificate and private key to the Server, set variables in the shell environment of the fdx utility by entering the following commands.

    For the C shell:

    setenv SSL_PKEY_FILE <User ID>-key.pem
    setenv SSL_PKEY_FILE <User ID>-crt.pem
    where <User ID>-key.pem is the full pathname of the private key and <User ID>-crt.pem is the full pathname of the certificate.

    For the Bourne and Korn shells:

    export SSL_PKEY_FILE=<User ID>-key.pem
    export SSL_X509_FILE=<User ID>-crt.pem
    where <User ID>-key.pem is the full pathname of the private key and <User ID>-crt.pem is the full pathname of the certificate.

  3. Start the command interpreter, specifying a host to connect to automatically.


  4. Enter the following command:

    $NSBASE/NS-apps/paserver/bin/fdx <scheme>://<hostname>:[<port>] [-<options>]
    where the <scheme> is FTP, HTTP, or HTTPS; the <hostname> is the name of the host; <port> is the port on which the Server is listening; and <options> are any command line options you want to specify at start-up. See "Command Line Options" for a list of all available options.

    Command Line Client immediately attempts to establish a connection between Partner Agent Server and the remote server, and requests a secure certificate-authenticated session.




    Note

    Alternately, you can start the command interpreter without immediately connecting to another machine by entering the command

    $NSBASE/NS-apps/paserver/bin/fdx

    Partner Agent Server enters its command interpreter and awaits instructions from the user. The prompt fdx> appears, at which you can enter interactive commands.

    To connect to a host from the fdx> prompt, use the open command. For information on using the open command with FTP, see page 213; for information on using the open command with HTTP or HTTPS, see page 217.



  5. Once you are connected to the remote host, enter the PEM pass phrase associated with the certificate and the ECXpert member password.


  6. When Partner Agent Server makes a connection to a remote server, the certificate is transmitted to that server. After the PEM pass phrase is authenticated, the correct member name is extracted from the certificate and you will be prompted for the ECXpert member password. Once the username and password are authenticated against the ECXpert member database, you can perform any of the commands listed in "Interactive Commands".

Changing Transfer Protocol Schemes

Once you connect with the FTP scheme, you can switch to HTTP or HTTPS with the open command.

When you connect with the HTTP or HTTPS schemes, to change to FTP you must terminate the session and re-start the client.

Operating in Tunnel Mode

When transferring a file using the FTP scheme, you can operate in tunnel mode. In tunnel mode, the SSL session is established on a data connection rather than on the control connection. This is done because some firewalls terminate a connection when ciphered data is sent over the control connection. You must specify tunnel mode before a connection to the server is made.

To use tunnel mode, before a connection to the server is made:

  • Specify the -m tun option on the command line.


  • OR

  • At the fdx> prompt, use the command sslmode tun.


Environment Variables

Partner Agent Server Command Line Client utilizes the following environment variables:



Table B-1    Command Line Client environment variables  

COLUMNS

Correctly formats help display.

PAGER

Used for the built-in more command.

SHELL

Used for the default shell.

FTP_ANON_USER

The name to use when logging in anonymously.

FTP_ANON_PASS

The password to use when logging in anonymously.

FDX_PROGRESS

Turns on the progress meter.

Aborting a File Transfer

To abort a file transfer, use the terminal interrupt key (usually Ctrl-C). Transfers that are sending at that time are immediately halted. Sending an FTP protocol ABOR command to the remote server halts receiving transfers, discarding any further data received. The speed at which this occurs depends upon the remote server's support for ABORT processing. If the remote server does not support the ABOR command, the fdx> prompt does not appear until the remote server has completed transmitting the requested file.

The terminal interrupt key sequence is ignored when Partner Agent Server has completed any local processing and is awaiting a reply from the remote server. A long delay in this mode can 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 Partner Agent Server program must be killed by hand.

Transferring Files

You can transfer files non-interactively using shell scripts, from the UNIX command line, or interactively at the fdx> prompt.

The following sections describe how to perform common types of file transfers and activities.

Uploading or Downloading Files Using Shell Scripts

The client can be used non-interactively in shell scripts. When a file transfer is called as part of a script, use the following format:

$NSBASE/NS-apps/paserver/bin/fdx [<options>] [<URL>]

where <options> includes any of the options outlined in "Command Line Options" and <URL> is an HTTP, HTTPS, or FTP address, including the full upload pathname of the file to be transferred. If the port is not specified in the URL, the default port is used (21 for FTP, 80 for HTTP, and 443 for HTTPS).

Uploading Files from the Command Line

  • Enter the following command from the UNIX command line:


  • $NSBASE/NS-apps/paserver/bin/fdx [<options>] -u [<local filename>] <URL>
    where <options> includes any of the options outlined in "Command Line Options"; <local filename> is the full pathname of the local file to be uploaded; and <URL> is an HTTP, HTTPS, or FTP address, including the full upload pathname of the file to be transferred. If the port is not specified in the URL, the default port is used (21 for FTP, 80 for HTTP, and 443 for HTTPS).




    Note

    The URL can include your username and password, in the form

    <scheme>://<user>:<pass>@<host.domain.com>/<file_path_and_na me>

    Otherwise, you wll be prompted for a username and password when you make the connection to the remote server.



    Figure B-1 shows an example FTP session in which user actraadm, with password actraadm, uploads the file 20000208.html to the /u/bus_docs/850/ directory on siroe.com's FTP site.


    Figure B-1    Example FTP upload session from the UNIX command line  


    Trying 205.211.46.86:35 ... Connected to siroe.com.
    220 Siroe Corporation FTP server (SunOS 5.6) ready.
    [SSL Not Available]
    331 Password required for actraadm.
    230 User actraadm logged in.
    200 PORT command successful.
    150 Binary data connection for u/bus_docs/850/20000208.html (207.142.43.215,64319).
    226 Transfer complete.
    8058 bytes sent in 0.00035 seconds (2.2e+04 Kbytes/s)
    Upload OK: Local '../850/20000208.html' Remote 'u/bus_docs/850/20000208.html'
    221 Goodbye.
    $

Uploading Files Interactively

  • Enter the following command from the fdx> prompt:


put <local filename> <remote filename>




Note

fdx and other FTP command-line clients do not support ECXpert batch submission, i.e., mput behavior.

The Partner Agent Windows Client, however, does support mput behavior by decomposing batch file transfers into individual transfers, transparently to the user.



Figure B-2 shows an example FTP session in which user actraadm uploads the file 20000208.html to the /u/bus_docs/850/ directory on siroe.com's FTP site.l


Figure B-2    Sample FTP upload (put) session from the fdx> prompt 


fdx> open siroe.com
Trying 205.211.46.86:35 ... Connected to siroe.com.
220 Siroe Corporation FTP server (SunOS 5.6) ready.
[SSL Not Available]
Name (siroe:actraadm): actraadm
331 Password required for actraadm.
Password:
230 User actraadm logged in.
fdx> put ../850/20000208.html /u/bus_docs/850/20000208.html
200 PORT command successful.
150 Binary data connection for /u/bus_docs/850/20000208.html (207.142.43.215,64319).
226 Transfer complete.
8058 bytes sent in 0.01 seconds (7.8e+02 Kbytes/s)
fdx>

Uploading Files to ECXpert from the Command Line

  • Enter the following command from the UNIX command line:


  • $NSBASE/NS-apps/paserver/bin/fdx [<options>] -u [<local filename>] <URL>@<unique ID>@<sender>@<sender password>@<receiver>@<document type>@
    where <options> includes any of the options outlined in "Command Line Options"; <local filename> is the full pathname of the local file to be uploaded; <URL> is an HTTP, HTTPS, or FTP address, including the full upload pathname of the file to be transferred; <unique ID> is any unique alphanumeric identifier, used to prevent existing files from being overwritten and stripped out by ECXpert; <sender> is the ECXpert Member ID of the sender; <sender password> is the ECXpert Member password of the sender; <receiver> is the ECXpert Member ID of the receiver; and <document type> is the document type specified in the trading partnership.

    If the port is not specified in the URL, the default port is used (21 for FTP, 80 for HTTP, and 443 for HTTPS).




    Note

    The URL can include your username and password, in the form

    <scheme>://<user>:<pass>@<host.domain.com>/<file_path_and_name >

    Otherwise, you wll be prompted for a username and password when you make the connection to the remote server.



    Figure B-3 shows an example FTP session in which ECXpert member john uploads a file, ecx.ini, to ECXpert member jane, using the document type of pas_test and the outbound protocol poll specified in the trading partnership. The ECXpert submission parameters supplied to send the file include <sender>, <sender password>, <receiver>, and <document type>. Note that the ECXpert tracking ID is displayed to the client in both human-readable and tag-based (programmatically-readable) forms.

    Figure B-3    Sample FTP upload to ECXpert from the UNIX command line 


    $ pwd /actraadm/NS-apps/ECXpert/config
    $ export SSL_PKEY_FILE=/actraadm/NS-apps/ECXpert/config/john-key.pem
    $ export SSL_X509_FILE=/actraadm/NS-apps/ECXpert/config/john-crt.pem
    $ fdx -u ecx.ini ftp://actraadm:actraadm@siroe.com/CompanyA/1@john@john@jane@pas_test
    Trying 208.12.34.124:1027 ... Connected to remoteserver.
    220 remoteserver FTP server (Partner Agent 1.0) ready.
    Enter PEM pass phrase:
    [SSLv3 Cipher DES-CBC3-SHA]
    331 Password required for john.
    230-User john authenticated by ECXpert.
    230-Welcome to ECXpert
    230 Virtual user john logged in.
    200 PORT command successful.
    150 Opening BINARY mode SSL data connection for 1@john@john@jane@pas_test@.
    226 Transfer Complete: Submitted to ECXpert successfully with tracking ID
    5.<SR><TI>5</TI><RC>0</RC><EM>Submitted to ECXpert successfully with tracking
    ID 5</EM></SR>
    69099 bytes sent in 0.16 seconds (4.2e+02 Kbytes/s)
    fdx> quit
    221-Logged out from ECXpert
    221-
    221 Goodbye.
    $

Uploading Files to ECXpert Interactively

  • Enter the following command from the fdx> prompt if you are already connected to the ECXpert server:


  • put <local filename> <remote filename>@<unique ID>@<sender>@<sender password>@
    <receiver>@<document type>@




    Note

    fdx and other FTP command-line clients do not support ECXpert batch submission, i.e., mput behavior.

    The Partner Agent Windows Client, however, does support mput behavior by decomposing batch file transfers into individual transfers, transparently to the user.



Figure B-4 shows an example FTP session in which ECXpert member john uploads (using put) a file, ecx.ini, to ECXpert member jane, using the document type of pas_test and the outbound protocol poll specified in the trading partnership. The ECXpert submission parameters supplied to send the file include <sender>, <sender password>, <receiver>, and <document type>. Note that the ECXpert tracking ID is displayed to the client in both human-readable and tag-based (programmatically-readable) forms.


Figure B-4    Sample FTP upload (put) to ECXpert from the fdx> prompt 


$ pwd /actraadm/NS-apps/ECXpert/config
$ export SSL_PKEY_FILE=/actraadm/NS-apps/ECXpert/config/john-key.pem
$ export SSL_X509_FILE=/actraadm/NS-apps/ECXpert/config/john-crt.pem
$ /actraadm/NS-apps/paserver/bin/fdx ftp://remoteserver:1027
Trying 208.12.34.124:1027 ... Connected to remoteserver.
220 remoteserver FTP server (Partner Agent 1.0) ready.
Enter PEM pass phrase:
[SSLv3 Cipher DES-CBC3-SHA]
331 Password required for john.
Password:
230-User john authenticated by ECXpert.
230-Welcome to ECXpert
230-
230 Virtual user john logged in.
fdx> put ecx.ini 1@john@john@jane@pas_test@
200 PORT command successful.
150 Opening BINARY mode SSL data connection for 1@john@john@jane@pas_test@.
226 Transfer Complete: Submitted to ECXpert successfully with tracking ID
6.<SR><TI>6</TI><RC>0</RC><EM>Submitted to ECXpert successfully with tracking
ID 6</EM></SR>
69099 bytes sent in 0.16 seconds (4.2e+02 Kbytes/s)
fdx> quit
221-Logged out from ECXpert
221-
221 Goodbye.
$

Downloading Files from the Command Line

  • Enter the following command from the UNIX command line:


  • $NSBASE/NS-apps/paserver/bin/fdx [<options>] -d <URL> [<local filename>]
    where <options> includes any of the options outlined in "Command Line Options"; <URL> is an HTTP, HTTPS, or FTP address, including the full upload pathname of the file to be transferred; and <local filename> is the full download path of the file to be transferred. If the port is not specified in the URL, the default port is used (21 for FTP, 80 for HTTP, and 443 for HTTPS).

    For example:

    fdx -d ftp://user:pass@host.domain.com/<remote filename> [<local filename>]



    Note

    The URL can include your username and password, in the form

    <scheme>://<user>:<pass>@<host.domain.com>/<file_path_and_name >

    Otherwise, you wll be prompted for a username and password when you make the connection to the remote server.



    Figure B-5 shows an example FTP session in which user actraadm, with password actraadm, downloads the file 20000208.html from the /u/bus_docs/850/ directory on siroe.com's FTP site and places it in the ../850/ local directory.


    Figure B-5    Sample FTP upload from the UNIX command line prompt  


    $ fdx -d ftp://actraadm:actraadm@siroe.com/u/bus_docs/850/20000208.html ../850/20000208.html
    Trying 205.211.46.86:35 ... Connected to siroe.com.
    220 Siroe Corporation FTP server (SunOS 5.6) ready.
    [SSL Not Available]
    331 Password required for actraadm.
    230 User actraadm logged in.
    200 PORT command successful.
    150 Binary data connection for u/bus_docs/850/20000208.html (207.142.43.215,64319).
    226 Transfer complete.
    8058 bytes sent in 0.00035 seconds (2.2e+04 Kbytes/s)
    Upload OK: Local '../850/20000208.html' Remote 'u/bus_docs/850/20000208.html'
    221 Goodbye.
    $

Downloading Files Interactively

  • Enter the following command from the fdx> prompt:


  • get <remote filename> <local filename>



    Note

    fdx and other FTP command-line clients do not support ECXpert batch retrieval, i.e., mget behavior.

    The Partner Agent Windows Client, however, does support mget behavior by decomposing batch file transfers into individual transfers, transparently to the user.



Figure B-6 shows an example FTP session in which user actraadm downloads the file 20000208.html from the /u/bus_docs/850/ directory on siroe.com's FTP site and places it in the ../850/ local directory.


Figure B-6    Sample FTP upload (get) from the fdx> prompt 


fdx> open siroe.com
Trying 205.211.46.86:35 ... Connected to siroe.com.
220 Siroe Corporation FTP server (SunOS 5.6) ready.
[SSL Not Available]
Name (siroe:actraadm): actraadm
331 Password required for actraadm.
Password:
230 User actraadm logged in.
fdx> get /u/bus_docs/850/20000208.html ../850/20000208.html
200 PORT command successful.
150 Binary data connection for /u/bus_docs/850/20000208.html (207.142.43.215,64319).
226 Transfer complete.
8058 bytes sent in 0.01 seconds (7.8e+02 Kbytes/s)
fdx>

Downloading Files to ECXpert from the Command Line

  • Enter the following command from the UNIX command line:


  • $NSBASE/NS-apps/paserver/bin/fdx [<options>] -d <URL>@<unique ID>@<receiver>@<sender>@<document type>@ [<local filename>]
    where <options> includes any of the options outlined in "Command Line Options"; <URL> is an HTTP, HTTPS, or FTP address, including the full upload pathname of the file to be transferred; <unique ID> is any unique alphanumeric identifier, used to prevent existing files from being overwritten and stripped out by ECXpert; <receiver> is the ECXpert Member ID of the receiver, <sender> is the ECXpert Member ID of the sender, <document type> is the document type specified in the trading partnership; <local filename> is the full pathname of the local file to be uploaded.

    If the port is not specified in the URL, the default port is used (21 for FTP, 80 for HTTP, and 443 for HTTPS)..




    Note

    The URL can include your username and password, in the form

    <scheme>://<user>:<pass>@<host.domain.com>/<file_path_and_n ame>

    Otherwise, you wll be prompted for a username and password when you make the connection to the remote server.



Figure B-7 shows an example FTP session in which ECXpert member john polls files from ECXpert sent by another member, jane. The ECXpert submission parameters supplied to retrieve the file include <receiver>, <sender>, and <document type>. Note that the ECXpert tracking ID is displayed to the client in both human-readable and tag-based (programmatically-readable) forms.


Figure B-7    Sample FTP session download from ECXpert from the UNIX command line 


$ pwd /actraadm/NS-apps/ECXpert/config
$ export SSL_PKEY_FILE=/actraadm/NS-apps/ECXpert/config/john-key.pem
$ export SSL_X509_FILE=/actraadm/NS-apps/ECXpert/config/john-crt.pem
$ fdx -d ftp://actraadm:actraadm@siroe.com/CompanyA/1@john@jane@pas_test ecx.ini
Trying 208.12.34.124:1027 ... Connected to remoteserver.
220 remoteserver FTP server (Partner Agent 1.0) ready.
Enter PEM pass phrase:
[SSLv3 Cipher DES-CBC3-SHA]
331 Password required for john.
230-User john authenticated by ECXpert.
230-Welcome to ECXpert
230 Virtual user john logged in.
200 PORT command successful.
150 Opening BINARY mode SSL data connection for 1@john@jane@pas_test@. (69099
bytes)
226 Transfer Complete: Retrieved data from ECXpert successfully with tracking
ID 7.<SR><TI>7</TI><RC>0</RC><EM>Retrieved data from ECXpert successfully with
tracking ID 7</EM></SR>
69099 bytes sent in 1.5 seconds (44 Kbytes/s)
fdx> quit
221-Logged out from ECXpert
221-
221 Goodbye.
$

Downloading Files to ECXpert Interactively

  • Enter the following command from the fdx> prompt if you are already connected to the ECXpert server:


get <remote filename>@<unique ID>@<receiver>@<sender>@<document type>@ [<local filename>]




Note

fdx and other FTP command-line clients do not support ECXpert batch retrieval, i.e., mget behavior.

The Partner Agent Windows Client, however, does support mget behavior by decomposing batch file transfers into individual transfers, transparently to the user.



Figure B-8 shows an example FTP session in which ECXpert member john polls (using get) files from ECXpert sent by another member, jane. The ECXpert submission parameters supplied to retrieve the file include <receiver>, <sender>, and <document type>. Note that the ECXpert tracking ID is displayed to the client in both human-readable and tag-based (programmatically-readable) forms.


Figure B-8    Sample FTP session download (get) from ECXpert from the fdx> prompt 


$ pwd /actraadm/NS-apps/ECXpert/config
$ export SSL_PKEY_FILE=/actraadm/NS-apps/ECXpert/config/john-key.pem
$ export SSL_X509_FILE=/actraadm/NS-apps/ECXpert/config/john-crt.pem
$ /actraadm/NS-apps/paserver/bin/fdx ftp://remoteserver:1027
Trying 208.12.34.124:1027 ... Connected to remoteserver.
220 remoteserver FTP server (Partner Agent 1.0) ready.
Enter PEM pass phrase:
[SSLv3 Cipher DES-CBC3-SHA]
331 Password required for john.
Password:
230-User john authenticated by ECXpert.
230-Welcome to ECXpert
230-
230 Virtual user john logged in.
fdx> get 1@john@jane@pas_test@
200 PORT command successful.
150 Opening BINARY mode SSL data connection for 1@john@jane@pas_test@. (69099
bytes)
226 Transfer Complete: Retrieved data from ECXpert successfully with tracking
ID 8.<SR><TI>8</TI><RC>0</RC><EM>Retrieved data from ECXpert successfully with
tracking ID 8</EM></SR>
69099 bytes sent in 1.5 seconds (44 Kbytes/s)
fdx> quit
221-Logged out from ECXpert
221-
221 Goodbye.
$

Command Line Options

The command line options that are available depend on the transfer scheme (FTP, HTTP, or HTTPS) in which you are operating.

FTP Command Line Options

The following command line options are available with the FTP scheme:



Table B-2    FTP command line options  

Option

Description

-h

Show help.

-d

Download the specified file.

-u

Upload the specified file.

-e

Delete the specified file.

-l

List the contents of the specified directory.

-i

Turns off interactive prompting during multiple file transfers.

-q

Does not print messages to the server during non-interactive mode. Reports only exit status. Primarily a quiet mode.

-p

Enables passive mode for use behind connection filtering firewalls.

-a

Log in anonymously.

-n

Turn off auto-restart.

-r

Restart a command line transfer.

-f

Retry if connection fails, (default is on).

-w N

Wait N seconds between connect attempts, (default is 30).

-g N

Give up after N connect attempts, (default is 3).

-b N

Set bandwidth throttle to N Kb/s.

-x host

Send user name as user@host for use in a proxy environment.

-M a

Set the transfer mode to ascii.

-M b

Set the transfer mode to EBCDIC.

-M i

Set the transfer mode to binary.

-s req

Only connect to SSL enabled servers.

-s off

Turn off SSL.

-s opt

SSL is optional (default option).

-m std

Use AUTH SSL negotiation on control channel, (default mode).

-m spe

Use AUTH SPE (SSL payload encryption) on control channel.

-m tun

Negotiate SSL via an sslftp tunnel (SSLv3 only).

-v 2|3

Support only SSL v2 or v3 (default is v23).

-F off

Disable Partner Agent server probe: server is not Partner Agent Server.

-P

Turn on a progress meter for transfers.

HTTP(S) Command Line Options

The command line options available with the HTTP(S) scheme are a subset of those available for FTP. Following are the HTTP(S) options:



Table B-3    HTTP(S) command line options  

Option

Description

-q

Does not print messages to the server during non-interactive mode. Reports only exit status. Primarily a quiet mode.

-d

Download the specified file.

-u

Upload the specified file.

-e

Delete the specified file.

-l

List the contents of the specified directory.

-h

Show help.

-i

Turns off interactive prompting during multiple file transfers.

-a

Log in anonymously.

-n

Turn off auto-restart.

-r

Restart a command line transfer.

-f

Retry if connection fails, (default is on).

-w N

Wait N seconds between connect attempts, (default is 30).

-g N

Give up after N connect attempts, (default is 3).

-b N

Set bandwidth throttle to N Kb/s.

-x host

Send user name as user@host for use in a proxy environment.

-v 2|3

Support only SSL v2 or v3, (default is v23).

-F off

Disable Partner Agent server probe: server is not Partner Agent Server.

-P

Turn on a progress meter for transfers.

Interactive Commands

The commands that are available depend on the scheme (FTP, HTTP, or HTTPS) in which you are operating.

File Naming Conventions

Files specified as arguments to Partner Agent Server commands are processed according to the following rules:

  • If the file name "-" is specified, the stdin (for reading) or stdout (for writing) is used. If the first character of the file name is "|," the remainder of the argument is interpreted as a shell command. Partner Agent Server then forks a shell, using popen(3) with the argument supplied, and reads (writes) from the stdout (stdin). If the shell command includes spaces, the argument must be quoted, for example:


  • get README "|wc -l"
    OR

    put "|ls -al" listing
  • Failing the above checks, local file names are expanded according to the rules used by csh(1). If the command expects a single local file (e.g. put), only the first filename generated by the "globbing" operation is used.


  • For mget and get commands with unspecified local file names, the local filename is the remote file name.


  • For mput and put commands with unspecified remote file names, the remote file name is the local file name.





  • Note

    fdx and other FTP command-line clients do not support ECXpert batch submission and retrieval, i.e., mput and mget behavior.

    The Partner Agent Windows Client, however, does support mputand mget behavior by decomposing batch file transfers into individual transfers, transparently to the user.



File Transfer Parameters

The FTP specification defines many parameters that can affect an FTP file transfer. These parameters are type, mode form, and struct. Partner Agent Server supports only the default values for these, except for type. Type is either:

  • ascii


  • OR

  • image (binary).


FTP Interactive Commands

The following commands are recognized by Partner Agent Server Command Line Client in the FTP scheme.




Note

Commands marked with an * are available only when the Client is connected to a Partner Agent Server.





Table B-4    FTP interactive commands  

Command

Description

! [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 the command's arguments.

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 is prompted for an account password in a non-echoing input mode.

Note: This command is not supported by Partner Agent Server.

alias

Get server alias list.

anonymous

Toggle anonymous logins.

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 in naming the remote file. File transfer uses the current settings for type, format, mode, and structure.

Note: This command is not supported by Partner Agent Server.

ascii

Set the file transfer type to network ASCII. This is the default type.

*autorest

Toggle automatic restart of partial transfers.

bandwidth [N]

Set throttle bandwidth in KB/s.

binary

Set the file transfer type to support binary image transfer.

bye

Terminate the FTP session with the remote server and exit FTP. An end of file, (Ctrl-D), also terminates the session and exits.

cd [remote-directory]

Change the working directory on the remote machine to remote directory.

cat [file-name]

View contents of remote file.

cdpath

Get server cdpath list.

cdup

Change the remote machine working directory to the parent of the current remote machine working directory.

*checksum

Toggle MD5 checksums on get/put.

chmod mode file-name

Change the permission modes of the file file-name on the remote system to mode.

close

Terminate the FTP session with the remote server, and return to the command interpreter.

commands

Show FTP commands sent to server.

delete remote-file

Delete the file remote-file on the remote machine.

dir [remote-directory]

Print a list of the contents of a directory on the remote machine. The listing includes any system-dependent information that the server chooses to include. If remote-directory is left unspecified, the current working directory is used. If you dir a file-name, information about the file is printed.

exit

Terminate the FTP session with the remote server and exit. An end of file also terminates the session and exits.

form format

Set the file transfer form to format. The default format is "non-print." Partner Agent Server only supports the default mode.

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. The current settings for type, form, mode, and structure are used while transferring the file.

help [command]

Print an informative message about the meaning of command. If no argument is given, Partner Agent Server prints a list of the known commands.

idle [seconds]

Set the inactivity timer on the remote server to seconds. If seconds is omitted, the current inactivity timer is printed.

image

Set the file transfer type to support binary image transfer.

lcd [directory]

Change the working directory on the local machine. If no directory is specified, the user's home directory is used.

lcdup

Change the local working directory to parent.

*lmd5 [local-file]

Compute MD5 checksum of local file.

lpwd

Get local working directory.

ls [remote-directory]

Print a list 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 produce output from the command ls-l. (See also nlist). If remote-directory is left unspecified, the current working directory is used. If you ls a file-name, information about the file is printed.

lsd [directory name]

Page contents of remote directory.

md directory-name

Make a directory on the remote machine.

*md5 remote-file

Compute MD5 checksum of remote file.

mdelete [remote-files]

Delete the remote-files on the remote machine.

mget remote-files

Expand the remote-files on the remote machine and do a get for each file name that is produced. Files are transferred into the local working directory, which can be changed with the lcd directory command. New local directories can be created with !.

mkdir

Make a directory on the remote machine.

mode [mode-name]

Set the file transfer mode to mode-name. The default mode is "stream" mode. Partner Agent Server only supports the default mode.

modtime file-name

Show the last modification time of the file on the remote machine.

more file-name

Page contents of remote file.

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.

newer file-name

Get the file only if the modification time of the remote file is more recent than the file on the current system. If the file does not exist on the current system, the remote file is considered newer. Otherwise, this command is identical to get.

nlist [remote-directory]

Print a list of the files in a directory on the remote machine. If remote directory is left unspecified, the current working directory is used.

open host [port]

Establish a connection to the specified host server. An optional port number can be supplied, in which case, Partner Agent Server attempts to contact a server at that port.

passive

Enable passive mode operation for use behind connection filtering firewalls.

progress

Toggle the progress meter for file transfers. The default is for the progress meter to be off.

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 is on), any mget or mput transfers all files, and any mdelete deletes all files.

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. 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

Terminate the FTP session with the remote server and exit FTP. An end of file also terminates the session and exits.

quote arg 1 arg 2 . . .

The arguments specified are sent, verbatim, to the remote FTP server.

rd directory-name

Delete a directory on the remote machine.

reget remote-file [local-file]

Reget acts like get, except that if local-file exists and is smaller than remote-file, local-file is presumed to be a partially transferred copy of remote-file and the transfer is continued from the apparent point of failure. This command is useful when transferring very large files over networks that are prone to dropping connections.

An md5 checksum is taken on the partial transmitted file and compared to the original to insure the data integrity of the transfer. If it is different you are asked if you wish to continue the transfer, abort or start over.

restart

A manual way of invoking the restart function if the connection to the server is interrupted.

rename [from] [to]

Rename a remote file.

reput local-file [remote-file]

Reput acts like put, except that if remote-file exists and is smaller than local-file, remote-file is presumed to be a partially transferred copy of remote-file and the transfer is continued from the apparent point of failure. This command is useful when transferring very large files over networks that are prone to dropping connections.

An MD5 checksum is taken on the partial transmitted file and compared to the original to insure the data integrity of the transfer. If it is different you are asked if you want to continue the transfer, abort or start over.

retry

Toggle connection retry.

rhelp [command-name]

Request help from the remote FTP server. If a command-name is specified, it is supplied to the server as well.

rmdir directory-name

Delete a directory on the remote machine.

rstatus [file-name]

With no arguments, show status of remote machine. If file-name is specified, show status of file-name on remote machine.

sendport

Toggle the use of PORT commands. By default, Partner Agent Server 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, Partner Agent Server uses the default data port. When the use of PORT commands is disabled, no attempts are made to use PORT commands for each data transfer. This is useful for certain FTP implementations that do ignore PORT commands but, incorrectly, indicate they have been accepted.

site arg 1 arg 2 . . .

The arguments specified are sent, verbatim, to the remote FTP server as a SITE command.

size file-name

Return size of the file-name on the remote machine.

ssl option

Set SSL options to req, opt, or off.

sslmode mode

Set SSL mode to std, spe, or tun).

sslver version number

Set SSL version to v2, v3, or v23).

status

Show the current status of Partner Agent Server.

struct [struct-name]

Set the file transfer type to struct-name. By default "file" structure is used. Partner Agent Server only supports the default.

system

Show the type of operating system running on the remote machine.

throttle

Toggle bandwidth throttling.

type [type-name]

Set the file transfer type to type-name. If no type is specified, the current type is printed. The default type is network ASCII.

umask [newmask]

Set the default umask on the remote server to newmask. If newmask is omitted, the current umask is printed.

*update file-name

Get if remote file is different from local copy.

user user-name [password] [account]

Identify yourself to the remote FTP server. If the password is not specified and the server requires it, Partner Agent Server prompts you for it (after disabling the local echo). If an account is not specified, and the FTP server requires it, you are prompted for it. If an account is specified, an account command is relayed to the remote server after the login sequence is completed if the remote server did not require it for logging in. Unless Partner Agent Server is invoked with "auto-login" disabled, this process is done automatically on initial connection to the FTP server.

verbose [level]

If no level is specified, toggle verbose mode, or set verbose mode to the specified level. In verbose mode, all responses from the FTP server are displayed to you. In addition, if verbose mode is on, when a file transfer completes, statistics regarding the efficiency of the transfer are reported. By default, verbose is on. Enter a number for the level of verbosity.

? [command]

Print an informative message about the meaning of command. If no argument is given, Partner Agent Server prints a list of the known commands. Command arguments that have embedded spaces can be quoted with quotation marks.

HTTP or HTTPS Interactive Commands

The following commands are recognized by Partner Agent Server Command Line Client in the HTTP or HTTPS schemes:




Note

Commands marked with an * are available only when the Client is connected to a Partner Agent Server.





Table B-5    HTTP(S) interactive commands  

Command

Description

! [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.

anonymous

Toggle anonymous logins.

*autorest

Toggle automatic restart of partial transfers.

bandwidth [N]

Set throttle bandwidth in KB/s.

bye

Terminate the HTTP session with the remote server and exit Partner Agent Server. An end of file also terminates the session and exits.

cd [remote-directory]

Change the working directory on the remote machine to remote directory.

cat [file-name]

View contents of remote file.

cdup

Change the remote machine working directory to the parent of the current remote machine working directory.

*checksum

Toggle MD5 checksums on get/put.

close

Terminate the session with the remote server, and return to the command interpreter.

commands

Show commands sent to server.

delete remote-file

Delete the file remote-file on the remote machine.

dir [remote-directory]

Print a list of the contents of a directory on the remote machine. The listing includes any system-dependent information that the server chooses to include. If remote-directory is left unspecified, the current working directory is used. If you specify a file name instead of a directory name, Partner Agent Server will get the file.

exit

Terminate the session with the remote server and exit Partner Agent Server. An end of file also terminates the session and exits.

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.

help [command]

Print an informative message about the meaning of command. If no argument is given, Partner Agent Server prints a list of the known commands.

lcd [directory]

Change the working directory on the local machine. If no directory is specified, the user's home directory is used.

lcdup

Change the local working directory to parent.

*lmd5 [local-file]

Compute MD5 checksum of local file.

lpwd

Get local working directory.

ls [remote-directory]

Print a list 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 produce output from the command ls-l. If remote-directory is left unspecified, the current working directory is used. If you specify a file name instead of a directory name, Partner Agent Server will get the file.

lsd [directory name]

Page contents of remote directory.

*md5 remote-file

Compute MD5 checksum of remote file.

modtime file-name

Show the last modification time of the file on the remote machine.

more file-name

Page contents of remote file.

newer file-name

Get the file only if the modification time of the remote file is more recent than the file on the current system. If the file does not exist on the current system, the remote file is considered newer. Otherwise, this command is identical to get.

open host [port]

Establish a connection to the specified host HTTP server. An optional port number can be supplied, in which case, Partner Agent Server attempts to contact the HTTP server at that port.

progress

Toggle the progress meter for file transfers. The default is for the progress meter to be off.

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 is on), any mget or mput transfers all files, and any mdelete deletes all files.

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.

pwd

Print the name of the current working directory on the remote machine.

quit

Terminate the session with the remote server and exit Partner Agent Server.

reget remote-file [local-file]

A manual way of invoking the restart function if the connection to the server is interrupted.

An MD5 checksum is taken on the partial transmitted file and compared to the original to insure the data integrity of the transfer. If it is different you are asked if you wish to continue the transfer, abort or start over.

reput local-file [remote-file]

Reput acts like put, except that if remote-file exists and is smaller than local-file, remote-file is presumed to be a partially transferred copy of remote-file and the transfer is continued from the apparent point of failure. This command is useful when transferring very large files over networks that are prone to dropping connections.

An MD5 checksum is taken on the partial transmitted file and compared to the original to insure the data integrity of the transfer. If it is different you are asked if you want to continue the transfer, abort or start over.

restart

A manual way of invoking the restart function if the connection to the server is interrupted.

retry

Toggle connection retry.

size file-name

Return size of the file-name on the remote machine.

status

Show the current status of Partner Agent Server.

throttle

Toggle bandwidth throttling.

*update file-name

Get if remote file is different from local copy.

user user-name [password]

Identify yourself to the remote server. If the password is not specified and the server requires it, Partner Agent Server prompts you for it (after disabling the local echo).

verbose [level]

If no level is specified, toggle verbose mode, or set verbose mode to the specified level. In verbose mode, all responses from the server are displayed to you. In addition, if verbose mode is on, when a file transfer completes, statistics regarding the efficiency of the transfer are reported. By default, verbose mode is on. Enter a number for the level of verbosity.

? [command]

Print an informative message about the meaning of command. If no argument is given, Partner Agent Server prints a list of the known commands. Command arguments that have embedded spaces can be quoted with quotation marks.

Tracking File Transfers in ECXpert

When you transfer files to or from ECXpert using the Command Line Client, ECXpert tracking information is displayed in the Client window in both human-readable form and in and tag-based—i.e., programmatically-readable—form (see Figure B-9).


Figure B-9    Sample ECXpert tracking information displayed by Command Line Client


ID 6.<SR><TI>6</TI><RC>0</RC><EM>Retrieved data from ECXpert successfully with
tracking ID 6</EM></SR>

The tag-based information is used by the Partner Agent Windows Client parser to display ECXpert tracking information to the Windows Client user. The following are the tags displayed by the Command Line Client after a file is transferred. Each tag-value pair is closed by the corresponding </X>, where X is a tag.

Table B-6    ECXpert tracking tags displayed by Command Line Client

Tag

Definition

<SR>

Start message

<TI>

ECXpert tracking ID (set to 0 on error)

<RC>

Return code (set to zero on success)

<EM>

Error message (could be set to nothing)

To track a file transfer from the ECXpert product administrative interface,

  1. Log into the ECXpert Product Administrative Interface.


  2. Click the Tracking button.


  3. The Enter Search Constraints tab is displayed.

  4. Click any of the other tabs.


  5. Enter the Tracking ID for the file transfer and click Search.


  6. For more information on using the ECXpert Tracking feature, see the ECXpert Site Administrator's Handbook.


Previous     Contents     Index          Next     


Copyright © 2000 Sun Microsystems, Inc.
Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated December 04, 2000