Previous | Contents | Index |
Deletes either UNIX or OpenVMS remote files. To use this command, you must have an FTP session with a remote host.
Note
Use caution with the mdelete command. The FTP command DIRECTORY does not list hidden files (files that start with a period). Using the mdelete command with any wildcard deletes hidden files, which you might need.
DELETE remote_filesDELETE/DIRECTORY remote_directory
delete remote_filemdelete remote_files
rmdir remote_directory
remote_file
remote_files
remote_directory
Required.File, files, or directory to delete.
/DIRECTORY
Optional. The /DIRECTORY qualifier must follow immediately after the DELETE command without a preceding space.Deletes an empty directory. To delete a directory that is not empty, you must first delete the contents of the directory.
#1 |
---|
FTP> DELETE [MAIN.BRANCH]*.*;* 250 DELE of [MAIN.BRANCH]*.*;* successful. |
Deletes all files in the remote OpenVMS directory [MAIN.BRANCH].
#2 |
---|
FTP> DELETE/DIRECTORY BRANCH.DIR;1 250 RMD command successful. |
Deletes the directory [MAIN.BRANCH].
#3 |
---|
FTP> DELETE "/users/venture/carton" 250 DELE command successful. |
Deletes UNIX file with path name /users/venture/carton .
#4 |
---|
FTP> mdelete /bids/west/january97/c* 250 DELE command successful. 250 DELE command successful. 250 DELE command successful. |
Deletes three UNIX files starting with the letter "c" from directory /bids/west/january97 . Note that the messages generated depend on the server. For example, for an OpenVMS server, messages would specify the names of the files deleted.
Lists the names of remote files and other information about them. The remote files can be on any FTP server. To use this command, you must have an FTP session with a remote host.The DCL DIRECTORY command supports the redirecting of output to a file.
DIRECTORY [ /BRIEF | /OUT=output_file ] [ remote_directory ]
ls [ /remote/path ]mls [ /remote/path]
remote_directory
/remote/path
Optional. Default: default directory.Directory with the file names you want to list. Wildcards and multiple directories are valid.
/BRIEF
Optional. Default: full display.Produces output similar to the UNIX ls command.
/OUT=output_file
Optional. If you do not specify the /OUT qualifier, FTP displays output to SYS$OUTPUT. If you do specify the /OUT qualifier, you must supply a valid output_file specification.Name of the file to hold the output.
#1 |
---|
FTP> DIRECTORY 200 PORT command successful 150 Opening data connection for /bin/ls (130.180.9.8,1150) total 76 -rwxr-x--x 1 geary users 261 Nov 6 2002 .cshrc -rw-r--r-- 1 root users 128 May 21 11:16 .mailrc -rwxr-x--x 1 geary users 182 Nov 6 2002 .profile drwxr-x--x 2 geary users 512 Nov 6 2002 bin . . . 226 Transfer complete. 911 bytes received in 00:00:00.07 seconds |
Displays a full listing of file names in the current default UNIX directory.
#2 |
---|
FTP> ls disk3$:[banks.branch.bills] 200 PORT command successful 150 Opening data connection for DISK3$:[BANKS.BRANCH.BILLS] (11.1.2.3.4) LOCAL_ACCTS.DIS;1 GO_FIGURE.EXE;14 COMPARE.EXE;4 SUMTOTAL.COM;1 226 NLST Directory transfer complete. 428 bytes received in 00:00:00.41 seconds (10.06 Kbyte/s) FTP> |
Displays a listing of file names in the directory of the connected host, which is another OpenVMS system.
Terminates your session with the remote host and returns to the FTP prompt.
DISCONNECT
closedisconnect
FTP> DISCONNECT 221 Goodbye. |
Disconnects the user from an OpenVMS system.
Enables or disables the display of all protocol commands sent to the remote host.Default: DISABLE LOG.
ENABLE LOGDISABLE LOG
debug
FTP> ENABLE LOG Bell off. Debugging on (debug=1). FTP> ENABLE REPLY Reply on. Verbose mode on. FTP> PUT PRICES.TXT YEAR.PRICES ---> PORT 1,2,3,4,7,138 200 PORT command successful. ---> STOR PRICES.TXT 150 Opening ASCII mode data connection for small.txt (1,2,3,4,7,138). 226 Transfer complete. local: WORK1$:[samson]prices.txt;1 remote: year.prices 609 bytes sent in 00:00:00.02 seconds (179.36 Kbytes/s) FTP> GET LAKE.IBIS LAKE_IBIS.DAT ---> PORT 1,2,3,4,7,138 200 PORT command successful ---> RETR lake.ibis 150 Opening ASCII mode data connection for lake.ibis (1.2.3.4,193) 226 Transfer complete local: LAKE_IBIS.DAT remote:lake.ibis 4 bytes received in 00:00:00.03 seconds (0.13 Kbytes/s) FTP> |
Turns on the display of commands sent to the remote host. Shows all the commands sent to the remote host during the execution of PUT and GET.
Enables or disables the expansion of remote file names during file transfers.
- PUT operations: expansion is done by the local host.
- GET operations: expansion is done on the remote host.
During GET operations, an expansion of a directory name might be different from the expansion of other file names. The result depends on the operating systems of the remote and local hosts.
ENABLE PARSEDISABLE PARSE
glob
#1 |
---|
FTP> ENABLE PARSE FTP> PUT BIRDS*.TXT |
Enables parsing and the expansion of wildcards. Copies all local files starting with the characters BIRDS and ending with .TXT to the remote host.
#2 |
---|
FTP> ENABLE PARSE FTP> GET *.DOC |
Because parsing is enabled, the remote host expands the wildcard. All remote files ending in .DOC are copied to the local system.
The command is equivalent to the following:
FTP> ENABLE PARSE FTP> MGET *.DOC
Enables or disables the sending of the FTP protocol PORT command to the remote host.By default, FTP sends a PORT command when establishing a connection. If this command fails, FTP uses the default data port (20).
Disable the sending of the PORT command when you communicate with remote hosts that ignore PORT commands.
Default: ENABLE PORT_COMMAND.
ENABLE PORT_COMMANDDISABLE PORT_COMMAND
sendport
FTP> ENABLE PORT_COMMAND FTP> PUT CODE.TXT 200 PORT command successful 150 Opening data connection for CODE.TXT (130.180.10.8,1182) 226 Transfer complete local: DISK$PROJECT6:[MANAGEMENT]CODE.TXT;9 remote: CODE.TXT 3634 bytes sent in 00:00:00.04 seconds (88.72 Kbytes/s) |
FTP enters a PORT command before the file transfer.
Enables or disables the display of all responses from the remote host.Default: ENABLE REPLY.
ENABLE REPLYDISABLE REPLY
debug
#1 |
---|
FTP> ENABLE REPLY Reply on. Verbose mode on. FTP> get birds.txt dogs.txt 200 PORT command successful. 150 Opening ASCII mode data connection for birds.txt (130,180,10,8,1570) (2405 bytes). 226 Transfer complete. local: WORK1$:[SAMSON]DOGS.TXT;1 remote: birds.txt 2405 bytes received in 00:00:00.03 seconds (60.22 Kbytes/s) FTP> |
Enables the display of all the responses from the remote host. Copies birds.txt from the remote host to the local file dogs.txt , and shows all the executed FTP commands in progress.
#2 |
---|
FTP> DISABLE REPLY Bell off. Reply off. Verbose off. FTP> get birds.txt dogs.txt FTP> |
Disables the display of all the responses from the remote host. Copies birds.txt from the remote host.
Enables or disables the display of # for each 1000 bytes of transferred data.
ENABLE TRANSFER_VERIFICATIONDISABLE TRANSFER_VERIFICATION
hash
FTP> ENABLE TRANSFER_VERIFICATION Bell off. Hash mark printing on (1024/hash mark). FTP> GET FUTURES.DIS FUTURES_H2.DIS 200 PORT command successful 150 Opening data connection for futures.dis (11.20.99.100,26) ############### 226 Transfer complete. local: FUTURES_H2.DIS remote: futures.dis 15596 bytes received in 00:00:00.11 seconds (138.45 Kbytes/s) FTP> |
Enables the display of # for each 1000 bytes of transferred data. Copies futures.dis to FUTURES_H2.DIS, showing when 1000 bytes are transferred.
Enables or disables VMS Plus Mode. This lets you specify a transfer mode based on file type (for example, ASCII or image).With VMS Plus Mode disabled, FTP does not send the FTP command SITE. (Older implementations of the FTP server do not support this command.) The FTP client uses the SITE command to identify itself (its SITE type) to the remote host. The SITE type of an FTP client can be one of the following:
- +VMS+ --- The client is in VMS Plus mode.
- NONE --- The client is not in VMS Plus mode.
Defaults:
- When you use FTP to connect to an OpenVMS host running TCP/IP Services, VMS Plus Mode is enabled.
- When you use FTP to connect to a non-OpenVMS host or to an Open VMS system running software that does not recognize VMS Plus Mode, VMS Plus Mode is disabled.
ENABLE VMS_PLUSDISABLE VMS_PLUS
There is no UNIX equivalent for the ENABLE or DISABLE VMS_PLUS command.
Closes an open connection and exits from FTP. Pressing Ctrl/Z is equivalent to the EXIT command.
EXIT
quitbye
The File Transfer Protocol (FTP) command starts an FTP session and does one of the following:
- Displays the FTP prompt. You can enter FTP commands to customize your environment and FTP command processing.
- Establishes a connection to the specified remote host.
FTP [ host [ port ] ] [ /USERNAME=remote_user_name ]
[ /PASSWORD=password ]
[ /INPUT=input_filespec ]
ftp [ host [ port ] ]
host
Optional.Remote host to which you want to connect.
port
Optional.Specifies the port to use.
/INPUT=input-filespec
Optional. If you do not specify the /INPUT qualifier, FTP takes input from SYS$INPUT. If you specifiy this qualifier, you must also supply an input file specification. FTP continues to prompt until it has a valid input file specification.Runs a DCL command file with FTP commands.
/PASSWORD=password
Optional. Default: your password on the local system.Password for the remote user account to which you want to connect.
/USERNAME=remote_user_name
Optional. Default: your user name on the local system.Name of the remote user account to which you want to connect.
#1 |
---|
$ FTP FTP> |
Starts an FTP user session without establishing a connection.
#2 |
---|
$ FTP WKSITE [Return] 220 wksite.texts.wrights.com FTP Server (UNIX 13:34:28 EDT) ready Connected to wren.nest.willow.com. Name (wksite:parks) [Return] 331 Password required for parks. Password: [Return] 230 User parks logged in. FTP> |
User PARKS starts an FTP session and connects to UNIX host wksite .
#3 |
---|
$ FTP NEWY /USERNAME=BENSON /PASSWORD=WMSWMS 220 NEWY.LINK1.MOA.COM FTP Server (Version 5.0) ready Connected to NEWY.LINK1.MOA.COM. 331 Username BENSON requires a password. 230 User logged in. FTP> |
Starts an FTP session and connects to remote OpenVMS host NEWY in user account BENSON.
The GET command does the following:
- Copies remote files to the local host.
- Copies files from a DECnet node.
To use this command, you must have an FTP session with a remote host.
GET remote_file [ local_file ]
[ /[NO]CONFIRM ]
[ /FDL]
get remote_file [ local_file ]mget remote_files
remote_file
Required.Name of the remote file to copy.
- To copy multiple files, separate the file names with commas or plus signs.
- When you specify multiple remote files, you cannot specify a local file name.
- To copy a file from a remote DECnet node, use the full specification: node name, device, directory, and file name.
local_file
Optional. Default: Same name (without any device or directory names).New name for the copied file. You cannot specify a local file name if you specify the following:
- Multiple remote files
- Wildcards in the the remote file name
/CONFIRM
Optional. Default: immediate execution.Asks you for confirmation before executing the copy operation.
/FDL
Optional. Default: no secondary file created.Uses a secondary file with the copied file's OpenVMS RMS record attributes (if you previously entered a PUT/FDL command). The SET TYPE command determines the type of file:
- Specifying ASCII results in a sequential file with variable records. Select this type when transferring ASCII text files.
- Specifying IMAGE results in a sequential file with fixed records of 512 bytes. Select this type when transferring non-ASCII files such as executable image files.
#1 |
---|
FTP> get "/seasons/standings/spring.deliveries" SPORTS.TXT 200 PORT command successful 150 Opening ASCII mode data connection for spring.stats. . . . |
Copies the UNIX file spring.deliveries to an OpenVMS host, where it is named SPORTS.TXT.
#2 |
---|
FTP> GET spring.deliveries SPORTS.TXT |
Copies the same file ( spring.deliveries ) when it is in your remote working directory.
#3 |
---|
FTP> mget *.doc 200 PORT command successful 150 Opening ASCII mode data connection for cast.doc;1 (130.180.4.8,27) 226 Transfer complete. local:cast.doc;1 remote: cast.doc;1 1222 bytes received in 00:00:00.01 seconds (70.19 Kbytes/s) 200 PORT command successful 150 Opening ASCII mode data connection for director.doc;3 (130.180.4.8,28) 226 Transfer complete. local: director.doc;1 remote: director.doc;3 90 bytes received in 00:00:00.01 seconds (5.49 Kbytes/s) FTP> |
Copies all the UNIX files ending with doc .
#4 |
---|
FTP> get/confirm *.*;* Get EDTINI.EDT ? [Y or N] [Y]: Y . . . |
Before executing the copy operation for every file in the remote default directory, FTP asks, one by one, to confirm that you want to copy each file.
To confirm mput , mget , and mdelete operations, use the FTP prompt command before entering the mput , mget , and mdelete commands.
FTP> prompt Interactive mode on. FTP> mget C* Get CHRONOS ? [Y or N or Q or G] [Y]: y 200 PORT command successful. 150 Opening ASCII mode data connection for CHRONOS (130.180.4.8,2150) (1596 bytes). 226 Transfer complete. local: WORK1$:[VANA]CHRONOS.;2 remote: CHRONOS 1596 bytes received in 00:00:00.04 seconds (31.80 Kbytes/s)
#5 |
---|
FTP> get/fdl feahers.dis |
Copies and preserves the record attributes of feathers.dis . (A put/fdl command was entered previously.)
Displays information about how to enter FTP commands. Provides help for both DCL and UNIX commands, as follows:
- HELP --- Displays all DCL FTP commands
- HELP ftp_command --- Displays DCL help information for the specified command
- ? --- Displays all the UNIX FTP commands
- ? command --- Displays help for the specified UNIX command
HELP [ /REMOTE ] [ command ]
help [ command ]? [ command ]
command
Optional.FTP command about which you would like information.
/REMOTE
Optional. Default: local host.The remote host displays FTP help information. If the remote host is a UNIX host, the FTP help is all UNIX style. If you want to display information about a specific command, the /REMOTE qualifier must follow the HELP command and precede the name of any command for which you want information, as shown in example 2.
#1 |
---|
FTP> HELP Information available: APPEND CONNECT CREATE DELETE DIRECTORY DISABLE DISCONNECT ENABLE EXIT GET HELP LOGIN PUT QUOTE RENAME SET SHOW SPAWN VIEW Topic? |
The local system displays all DCL FTP commands.
#2 |
---|
FTP> HELP/REMOTE 214-The following commands are recognized (* =>'s unimplemented) USER PORT STOR MSAM* RNTO NLST MKD CDUP LPSV PASS PASV APPE MRSQ* ABOR SITE XMKD XCUP EPRT ACCT* TYPE MLFL* MRCP* DELE SYST RMD STOU EPSV SMNT* STRU MAIL ALLO CWD STAT XRMD SIZE REIN* MODE MSND* REST* XCWD HELP PWD MDTM QUIT RETR MSOM* RNFR LIST NOOP XPWD LPRT 214 End of help FTP> |
The remote host, a UNIX system, displays the FTP commands you can use in your FTP session with this system.
#3 |
---|
FTP> HELP/REMOTE USER 214 Syntax: USER <sp> username FTP> |
The remote host displays information about the FTP command USER.
#4 |
---|
FTP> ? Commands may be abbreviated. Commands are: append disconnect mkdir remotehelp view ascii form mls rename view/p bell get mode reset view/pa binary glob mput rmdir view/pag bye hash open rstatus view/page case image prompt send vms cd lcd sendport status ? cdup ls put struct ! close lpwd pwd sunique delete mdelete quit type debug mdir quote user dir mget recv verbose FTP> |
Displays FTP HELP about UNIX commands.
Previous | Next | Contents | Index |