0ImageMagick File Transfer Utility4NF,
>

 


Contents










Synopsis 

d
xtp [ -options ... ] <uniform resource locator>


*Back to Contents






Description

F
Xtp is a utility for retrieving, listing, or printing files8from a remote network site, or sending files to a remoteBnetwork site. xtp performs most of the same functions as?the ftp(1) program, but does not require any interactive;commands. You simply specify the file transfer task on the<command line and xtp performs the task automatically.


*Back to Contents






Examples 

N
To retrieve the file bird.jpg in directory images from host!wizard.sympatico.org, use:

>
xtp ftp://wizard.sympatico.org/images/bird.jpg



:

To retrieve all the files from directory images+from host wizard.sympatico.org, use:

@
xtp -retrieve ftp://wizard.sympatico.org/images/

$You will be prompted for a password.

:

To retrieve all the files from directory images:as user cristy and password magick from host!wizard.sympatico.org, use:

N
xtp -retrieve ftp://cristy:magick@wizard.sympatico.org/images/




*Back to Contents






Options


%
-account password7
Supply a supplemental password required by a remotesystem for access to resources.



-binary8
retrieve files as binary. This is the default. Use)+binary to retrieve files as text.



-directory;
list the names of files and their attributes that match7the filename component of the uniform resource locator.0The filename component is processed as a regular expression.

'

-exclude expression=
exclude files that match the regular expression.

C

This option applies to the -directory, -print, or-retrieve options.



-file name"
store the file with this name.

E

Refer to the -get and -put option for more details.



-get6
get files that match the filename component of the4uniform resource locator. The filename component is(expanded by passing it to csh(1).

I

This option is equivalent to using the ftp get command.5However, if the filename contains globbing characters@this option is equivalent to the ftp mget command.3Without globbing characters, you can store the file7locally with a different name by using the -fileoption.

#

-ident password8
Supply a password required by a remote system. This'defaults to your username and hostname.

-port numberB
If no port number is specified, xtp attempts to contact1a FTP server at the default port. Otherwise, thespecified port number is used.

#

-proxy hostnameA
access the remote host via a proxy ftpd client running on this host.

8

The default value of this option can be set with the,environment variable xtp_proxy. See *Environment for>more details. Use +proxy to prevent proxy connections.



-print8
print files that match the filename component of the4uniform resource locator. The filename component is"processed as a regular expression.



-prune:
process files in the remote directory specified by the4directory component of the uniform resource locator.$Do not recursively search for files.



-put6
put files that match the filename component of the4uniform resource locator. The filename component is(expanded by passing it to csh(1).

I

This option is equivalent to using the ftp put command.EHowever, if the filename contains globbing characters, this option is*equivalent to the ftp mput command.

7

Without globbing characters, you can store the file8remotely with a different name by using the -fileoption.



-retrieve;
retrieve files that match the filename component of the4uniform resource locator. The filename component is"processed as a regular expression.

;

Retrieved files are stored on your local host directory5as the full name of the retrieved file. For example,>if the retrieved file is named documents/xtp.man on the0remote FTP server, it will appear in your remote&directory as documents/xtp.man.

$

-timeout seconds9
specifies the maximum seconds to complete your remote6FTP server request. If this time expires, the program5terminates. The program also terminates if one tenth7of this value is exceeded while logging onto the remote FTP server.



-type name9
identify the remote system type: UNIX, VMS, or other.

K

The system type is determined automatically, however, you can override!the system type with this option.





-verbose.
show all responses from the remote server.





J

If only the program name is specified on the command line, the program&command syntax and options are listed.

@

If neither -directory, -print, -put, orE-retrieve are specified on the command line, the file or filesFspecified by the uniform resource locator is retrieved from the remote/network host (as if -get was specified).

5

has the format:



*    protocol://host/[directory/[filename]]


.

where protocol is ftp and host isM[user[:password]]@hostname. User defaults to anonymous and5password defaults to host.domain. Note thatKdirectory/[filename] is interpreted relative to the home directoryGfor user, thus an absolute pathname must be specified with theleading /;



    ftp://host//tmp/anyfile


H

As an extension, the filename part of the locator is expanded by theLshell for options -get or -put, otherwise it is processed as aKregular expression. For convenience, the protocol component of the uniform2resource locator (ftp://) may be omitted.

L

Xtp retrieves files from the remote directory for -get andJputs files in the remote directory for -put. Otherwise, xtpKlooks for a file of the form ls-lls-l([Rt])+([Rt])* and assumes itEcontains a recursive directory listing. If none is found, xtpGrecursively descends the directory hierarchy from the remote directory.CSome remote hosts may have thousands of files causing a significantEdelay satisfying your request. This can be wasteful if the files youBare interested in reside in a known directory. You can reduce theGsearching required by specifying remote directory on the commandEline. This limits the filename search to the specified directory andFany of its subdirectories. Alternatively, -prune restricts the$search to the remote directory only.
*Back to Contents




Regular Expressions

D
A regular expression is zero or more branches,Mseparated by |. It matches anything that matches one of the branches.

@

A branch is zero or more pieces, concatenated. It matches a8match for the first, followed by a match for the second,etc.

B

A piece is an atom possibly followed by *, +, orG?. An atom followed by * matches a sequence of 0 or morematches of theCatom. An atom followed by + matches a sequence of 1 or moreBmatches of the atom. An atom followed by ? matches a match!of the atom, or the null pattern.

P

An atom is a regular expression in parentheses (matching aRmatch for the regular expression), a range (see below), .<(matching any single character), ^ (matching the nullBpattern at the beginning of the input pattern), $ (matching=the null pattern at the end of the input pattern), a '<followed by a single character (matching that character), or<a single character with no other significance (matching that character).

B

A range is a sequence of characters enclosed in []. It<normally matches any single character from the sequence. IfBthe sequence begins with ^, it matches any single character<not from the rest of the sequence. If two characters in theBsequence are separated by -, this is shorthand for the fullAlist of ASCII characters between them (e.g. [0-9] matchesBany decimal digit). To include a literal ] in the sequence,@make it the first character (following a possible ^). To@include a literal -, make it the first or last character.





*Back to Contents






Files



~/.netrc



*Back to Contents






Environment



xtp_proxy9
Specifies that the remote site should be contacted byproxy. See -proxy.



*Back to Contents






Copyright

7
Copyright 1997 E. I. du Pont de Nemours and Company:Permission to use, copy, modify, distribute, and sell this8software and its documentation for any purpose is hereby6granted without fee, provided that the above copyright8notice appear in all copies and that both that copyright6notice and this permission notice appear in supporting4documentation, and that the name of E. I. du Pont de1Nemours and Company not be used in advertising or4publicity pertaining to distribution of the software:without specific, written prior permission. E. I. du Pont9de Nemours and Company makes no representations about the4suitability of this software for any purpose. It is5provided "as is" without express or implied warranty.

6

E. I. du Pont de Nemours and Company disclaims all6warranties with regard to this software, including all8implied warranties of merchantability and fitness, in no:event shall E. I. du Pont de Nemours and Company be liable9for any special, indirect or consequential damages or any6damages whatsoever resulting from loss of use, data or8profits, whether in an action of contract, negligence or6other tortious action, arising out of or in connection-with the use or performance of this software.


*Back to Contents






Acknowledgements

H
Steve Singles, University of Delaware, for the initialimplementation of this program.

N

Henry Spencer, University of Toronto, for the implementationGof the regular expression interpreter and the text in"Regular Expressions.


#Back to Contents






Authors

>
John Cristy, G cristy@sympatico.org E.I. du Pont de Nemours and CompanyIncorporated.


#Back to Contents


4[home page]IImage manipulation software that works like magic.