HP ARPA File Transfer Protocol User's Guide (36957-90159)

Chapter 4 31
Using FTP
Performing Directory Operations
testt
226 transfer complete
Listing Directory Information to a Local File
You can transfer remote directory information to a local file with the LS or DIR commands
using the following form (assuming a remote host UNIX file system):
ftp> DIR [
remotedirectory
/]
filename localfile
or,
ftp> LS [
remotedirectory
/]
filename localfile
The format of
remotedirectory/filename
is dependent on the remote system
implementation. The
filename
part can contain metacharacters (wildcard characters)
supported by the remote system. Some metacharacters supported by the HP 9000 are
asterisk (*), and question mark (?).
For example, to transfer a listing of all files in the working directory to your local file
REMDIR, enter:
ftp> DIR * REMDIR
To transfer the contents of the directory named ftest beginning with the letter R to local
file REMDIR1, enter:
ftp> LS ftest/R* REMDIR1
Changing Directories
To change directories in the remote account you are using, enter the CD command as
follows:
ftp> CD
remotedirectory
Where
remotedirectory
is the directory you wish to access.
Example
The following example shows a user logged in to an HP 9000 as “myname” who checks the
current directory, changes directories, then checks the new current directory.
ftp> PWD
251 “/users/myname” is the current working directory.
ftp> CD test
200 CWD command okay.
ftp> PWD
251 “/users/myname/test” is the current working directory.
ftp> CD ..
200 CWD command okay.
ftp> PWD
251 “/users/myname” is the current working directory.