FTP CLI

 

 


PWD: Prints the current remote directory.
LIST: Lists the files and directories in the current remote directory.

Command:    PWD
Response:    257 "/" is your current location

CDUP: Changes the current remote directory to the parent directory.

MKD: Creates a new directory on the remote server.
RMD: Removes a directory from the remote server.

Command:    MKD /web/tmp
Response:    257 "/web/tmp" : The directory was successfully created

DELE: Deletes a file from the remote server.
RETR: Retrieves a file from the remote server.
STOR: Stores a file on the remote server.

SIZE: Returns the size of a file on the remote server.

TYPE: Sets the transfer mode (ASCII or binary).

Command:    TYPE I
Response:    200 TYPE is now 8-bit binary

 

Move / Rename

RNFR: Specifies the old name of a file or directory for renaming.
RNTO: Specifies the new name of a file or directory for renaming.

i.e.

RNFR /tmp/api
RNTO /web/api

 * 由於是 "rename" cmd, 所以 RNTO 要加上新 folder 名稱
 

 

 

Creative Commons license icon Creative Commons license icon