HP-UX Reference (11i v3 07/02) - 1 User Commands A-M (vol 1)

f
ftp(1) ftp(1)
COMMANDS
ftp supports the following commands. Command arguments with embedded spaces must be enclosed in
quotes (for example, "argument with embedded spaces").
![ command [args ]]
Invoke a shell on the local host. The
SHELL environment variable specifies which shell program to
invoke.
ftp invokes /usr/bin/sh if SHELL is undefined. If command is specified, the shell
executes it and returns to
ftp. Otherwise, an interactive shell is invoked. When the shell ter-
minates, it returns to ftp.
$ macro-name [ args ]
Execute the macro macro-name that was defined with the
macdef command. Arguments are
passed to the macro unglobbed.
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 pass-
word in a non-echoing input mode.
append local-file [ remote-file ]
Copy local-file to the end of remote-file.Ifremote-file is left unspecified, the local file name is used in
naming the remote file after being altered by any ntrans or nmap setting.
ascii
Set the file transfer type to network ASCII. This is the default type.
bell
Sound a bell after each file transfer completes.
binary
Set the file transfer type to binary.
bye Close the connection to the server host if a connection was open, and exit. Typing an end-of-file (EOF)
character also terminates and exits the session.
case
Toggle remote computer file name case mapping during mget commands. When
case is on (the
default is off), remote computer file names with all letters in uppercase are written in the local direc-
tory with the letters mapped to lowercase.
cd remote-directory
Set the working directory on the server host to remote-directory.
cdup
Set the working directory on the server host to the parent of the current remote working directory.
chmod mode file-name
Change the permission modes of the file file-name on the remote system to mode.
close
Terminate the connection to the server host. The close
command does not exit ftp. Any defined
macros are erased.
cr Toggle carriage return stripping during ascii type file retrieval. Records are denoted by a
carriage-return/line-feed sequence during ascii type file transfer. When cr
is on (the default),
carriage returns are stripped from this sequence to conform with the UNIX single line-feed record del-
imiter. Records on non-UNIX remote systems may contain single line-feeds; when an
ascii type
transfer is made, these line-feeds can be distinguished from a record delimiter only when cr is off.
delete remote-file
Delete remote-file. The remote-file can be an empty directory. No globbing is done.
dir [ remote-directory ][local-file]
Write a remote-directory listing to standard output or optionally to local-file. If neither remote-
directory nor local-file is specified, list the remote working directory to standard output. If interactive
prompting is on,
ftp prompts the user to verify that the last argument is indeed the target file for
dir output. Globbing characters are always expanded.
disconnect
A synonym for close.
HP-UX 11i Version 3: February 2007 2 Hewlett-Packard Company 389