Example, Macdef, Lcd ls macdef – HP Integrity NonStop H-Series User Manual
Page 61

lcd
Use the lcd command to change the current subvolume on the local system.
lcd [ subvolume ]
subvolume
is the Guardian name of the subvolume you want to use. If you omit subvolume, your default
subvolume becomes the current one.
Example
To change to a subvolume named $vol1.memos, use the following command:
ftp> lcd $vol1.memos
Local working vol.subvol: "$vol1.memos"
ls
Use the ls command to display an abbreviated listing of the contents of a directory on a remote
system.
ls [ remote-directory ] [ local-file ]
remote-directory
specifies the name of the remote directory. Specify remote-directory as required by the
remote system. If the remote host is a NonStop system, specify the name in the form
subvolume
.*.
If you omit remote-directory, the current working directory is displayed.
local-file
directs the output to the local file that you specify. If the file does not exist, FTP creates a text
file. If you omit local-file or if you specify a hyphen (-) as local-file, the output appears
on your terminal.
Example
The following command displays on the terminal the contents of the docs directory.
ftp> ls docs
macdef
Use the macdef command to define a macro of FTP commands.
macdef macro-name
macro-name
assigns a name to the macro. The name can contain from one through eight characters. Any
character except a space or tab is acceptable. If you define a macro named init (in FTPCSTM),
the macro is automatically executed as the last step of the logon process.
After you enter the macdef command, enter the set of FTP commands that define the macro—one
command per line. To terminate the definition, enter consecutive RETURNs at your terminal (or a
blank line in a text file).
Once defined, a macro remains defined until you enter a close or disconnect command.
You can have at most 16 macros defined at one time; the total number of characters in all defined
macros cannot exceed 4096.
To invoke a macro, enter $macro-name followed by any arguments the macro requires. If you
omit the arguments, FTP prompts you for them.
You can use the following special characters in a macro definition:
$n
FTP Command Reference
61