The ftp Command


The ftp Command

The File Transfer Protocol ( ftp ) command is used to start an interactive session to transfer files to and from two nodes using TCP ports 20 and 21. When using the ftp command from a DOS prompt, you are acting as an FTP client. The other end of your connection, with which FTP creates a session, is considered an FTP server providing FTP Server services.

One important point to remember is that every layer of the OSI Reference Model needs to be working correctly to make a connection to a remote host. If you can use FTP to connect to a remote host and transfer files, the local machine and remote nodes' TCP/IP stack are functioning correctly. Although you can purchase third-party FTP software, I will only explain the general syntaxes for the FTP client provided by the Windows operating system and used at the command prompt.

 C:\>  ftp 207.212.78.106  Connected to 207.212.78.106. 220-Welcome to Digital Crawl Spaces. Please e-mail Sean Odom (sean@digitalcrawlspaces.com) for help or login problems.  Thank you. User (207.212.78.106:(none)): sean 331 User sean Ok, password please Password:***** 230 Password Ok, User logged in ftp> 

The ftp command has several syntaxes. I will briefly explain each and then the most common commands used to find and transfer files.

 ftp [-v] [-d] [-i] [-n] [-g] [-s:  filename  ] [  host  ] 
  • -v . This syntax suppresses the display of responses from the remote FTP server.

  • -n . This syntax suppresses auto-login during the initial connection.

  • -i . This syntax disables interactive prompting during multiple file transfers, using the FTP commands mget and mput , which are used to upload and download multiple files.

  • -d . This syntax enables debugging which displays all ftp commands between the FTP client and the FTP server.

  • -g . This syntax can be used to disable filename globbing . Globbing is a term that refers to the use of wildcard characters in file names and path names .

  • -s . This syntax specifies that the file name is a text file that contains the commands that run when ftp starts.

  • host . This is the host name or the IP address of FTP server.

Once an FTP client has connected to an FTP server, a completely different set of commands are used; the most used commands are as follows :

  • dir . Display the directory of the current folder.

  • cd . This is the change directory command. This command followed by a folder name will change the current folder. To return to a previous folder, use a single period. To return to the root folder, use the cd command followed by two periods.

  • md . This is the make directory command. This command followed by a folder name will create that folder in the current directory.

  • put . This command followed by a file name will upload that file in the current folder. This is the folder that is displayed by a single dir command.

  • get . This command followed by a file name in the current folder that can be displayed by the dir command will download the file to the local host.



CCNP CIT Exam Cram 2 (642-831)
CCNP CIT Exam Cram 2 (Exam Cram 642-831)
ISBN: 0789730219
EAN: 2147483647
Year: 2003
Pages: 213
Authors: Sean Odom

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net