Portal Home > Knowledgebase > FTP > FTP Command-Line Interface Tips

FTP Command-Line Interface Tips


FTP Command


If you are using a terminal program or a command-line interface to connect 
to an FTP server, here are some FTP commands that are helpful to know.

Command Function Examples
ftp Connect to an FTP server
(type this command from within your terminal
program to begin an FTP session)
ftp ftp.servername.com
ftp 123.456.789.012
open Opens a connection with an FTP server
(usually followed by a login prompt)
open ftp.servername.com
help OR ? Display a list of commands help
? [command] Display helpful information about a command ? chmod
pwd Display the current directory on the FTP server pwd
cd Change the directory on the FTP server cd www (open the "www" directory)
cd .. (move up one directory)
lcd Chage the directory on your local computer lcd Documents
ls OR dir List the contents of a directory ls
rename Rename a file rename test1.html test2.html
delete Delete a file delete test.html
mkdir Create a new directory mkdir testing
rmdir Remove an existing directory rmdir testing
ascii Set the file transfer mode to ASCII text ascii
binary Set the file transfer mode to Binary binary
get Retrieves a file from the FTP server get test1.php Documents/test2.php
put Sends a file to the FTP server put Documents/test1.php test2.php
mget Retrieves multiple files from the FTP server
(requires "Y" or "N" before downloading each file)
mget test1.php test2.php test3.php
mput Sends multiple files to the FTP server
(requires "Y" or "N" before sending each file)
mput test1.php test2.php test3.php
close Close the current FTP session close
quit, exit, or bye Exit the FTP program quit




Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Tutorial (Views: 1147)

Powered by WHMCompleteSolution