Basic FTP Commands

General Discussions
Post Reply
User avatar
Neo
Site Admin
Site Admin
Posts: 2642
Joined: Wed Jul 15, 2009 2:07 am
Location: Colombo

Basic FTP Commands

Post by Neo » Thu Oct 01, 2009 1:12 am

>> How to connect to the FTP server?
ftp robot.lke.com

This command will attempt to connect to the ftp server at example.com and if it succeeds, it will ask you for the username and password.

>> Get help with the list of commands that you can use.
ftp> help

>> List the files and subdirectories in the current directory on the remote computer.
ftp> ls

>> Change the current working directory on the remote computer. Eg: Change the current directory to "new-directory".
ftp> cd new-directory

>> Changes the current directory to the parent direcotry.
ftp> cd..

>> Changes the current directory on the local computer. Eg: Change the current directory to "new-directory".
ftp> lcd new-directory

>> Changes to "ascii" mode for transferring text files.
ftp> ascii

>> Changes to "binary" mode for transferring all files that are not text files.
ftp> binary

>> Downloads the file abc.txt from the remote computer to the local computer.
>> Warning: If there already is file with the same name it will be overwritten.
ftp> get abc.txt

>> Uploads the file abc.txt from the local computer to the remote computer.
>> Warning: If there already is file with the same name it will be overwritten.
ftp> put abc.txt

>> Lists the file names and directory names of the current directory on the local computer.
ftp> !ls

>> Download multiple files. Eg: Downlaod all files that ends with ".php".
ftp> mget *.php

>> Upload multiple files. Eg: Downlaod all files that ends with ".php".
ftp> mput *.php

>> Delete a file.
ftp> delete abc.txt

>> Delete multiple files. Eg: Delete files that ends with ".jpg".
ftp> mdelete *.jpg

>> Turns iteractive mode on or off so that commands on multiple files are executed without user confirmation.
ftp> prompt

>> Exits the ftp program.
ftp> quit
Post Reply

Return to “General Discussions”