R3303-HP HSR6800 Routers Fundamentals Command Reference
68
Views
FTP client view
Default command level
3: Manage level
Parameters
remotefile: Filename or directory on the remote FTP server.
localfile: Name of a local file used to save the displayed information.
Usage guidelines
The ls command displays only the names of files and directories on the FTP server. The dir command
displays more information about the files and directories, such as the size and the creation date.
Examples
# List all files and subdirectories in the current directory of the FTP server.
[ftp] ls
227 Entering Passive Mode (192,168,1,50,17,165).
125 ASCII mode data connection already open, transfer starting for /*.
ar-router.cfg
logfile
mainar.bin
arbasicbtm.bin
ftp
test
bb.cfg
testcfg.cfg
226 Transfer complete.
FTP: 87 byte(s) received in 0.132 second(s) 659.00 byte(s)/sec.
# List all files in subdirectory logfile.
[ftp] ls logfile
227 Entering Passive Mode (192,168,1,50,10,49).
125 ASCII mode data connection already open, transfer starting for /logfile/*.
logfile.log
a.cfg
226 Transfer complete.
FTP: 20 byte(s) received in 0.075 second(s), 266.00 byte(s)/sec. .
# Save the names of all files in subdirectory logfile to file aa.txt.
[ftp] ls logfile aa.txt
227 Entering Passive Mode (192,168,1,50,4,3).
125 ASCII mode data connection already open, transfer starting for /logfile/*.
....226 Transfer complete.
FTP: 20 byte(s) received in 3.962 second(s), 5.00 byte(s)/sec.
# View the content of file aa.txt.
[ftp] quit
221 Server closing.
<Sysname> more aa.txt