3
Task Command
Display detailed information about a directory or file on the FTP
server.
dir
[
remotefile
[
localfile
] ]
Query a directory or file on the FTP server.
ls
[
remotefile
[
localfile
] ]
Change the working directory on the FTP server.
cd
{
directory
|
..
|
/
}
Return to the upper level directory on the FTP server.
cdup
Display the working directory being accessed.
pwd
Create a directory on the remote FTP server.
mkdir
directory
Remove the specified working directory on the FTP server.
rmdir
directory
Working with the files on the FTP server
After you log in to the server, you can upload a file to or download a file from the authorized directory
by following these steps:
1.
Use the
dir
or
ls
command to display the directory and the location of the file on the FTP server.
2.
Delete unused files to get more free storage space.
3.
Set the file transfer mode. FTP transmits files in two modes: ASCII and binary. Use ASCII mode to
transfer text files. Use binary mode to transfer image files.
4.
Use the
lcd
command to display the local working directory of the FTP client. You can upload the
file or save the downloaded file in this directory.
5.
Upload or download the file.
To work with files on the FTP server:
Task Command
Remarks
Display detailed information
about a directory or file on the
FTP server.
dir
[
remotefile
[
localfile
] ]
The
ls
command displays the name of a
directory or file only, while the
dir
command displays detailed information
such as the file size and creation time.
Query a directory or file on the
FTP server.
ls
[
remotefile
[
localfile
] ]
The
ls
command displays the name of a
directory or file only, while the
dir
command displays detailed information
such as the file size and creation time.
Delete the specified file on the
FTP server permanently.
delete
remotefile
N/A
Set the file transfer mode to
ASCII.
ascii
By default, ASCII mode is used.
Set the file transfer mode to
binary.
binary
By default, ASCII mode is used.
Set the FTP operation mode to
passive.
passive
By default, passive mode is used.
Display the local working
directory of the FTP client.
lcd
N/A
Upload a file to the FTP server.
put
localfile
[
remotefile
]
N/A