GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

FTP Client: Console

bullet Introduction
Most operating systems (UNIX, NT, Windows 95) are shipped with a built-in FTP Client that is accessed from a "console window". Many people don't use a console FTP client partly because they don't know one exists and partly because console FTP clients have a steeper learning curve. One you use, learn, and master a console FTP client you will very likely never use a graphical FTP client again. (It sounds crazy, but it's true for many people).

Getting Started

  1. Open a Console Window
    To use a console FTP client you will first need access to a "command prompt". This can be gained by opening a console window.

    • Windows 95/98/NT
      Look in the "Start->Program" menu for "MS-DOS prompt" or "Command Prompt". You can also open a console window by selecting "Start->Run" and entering the executable path "c:/windows/command/command.com" or "c:/winnt/system32/cmd.exe", depending on your version of Windows.

    • UNIX
      Most UNIX environments use console windows and command prompts quite extensively and UNIX users are already comfortable using them (or should be). When you Telnet or SSH to your Virtual Private Servers you are effectively open a command prompt remotely on your Virtual Private Servers. So you can, in effect, use FTP from a command prompt on your Virtual Private Servers to download a file from another remote host directly to your Virtual Private Servers.

      For example, you may want to download software from XYZ, Inc. (ftp.xyz.com) and install the software on your Virtual Private Servers. Instead of downloading the software from XYZ, Inc. to your office computer and then uploading it from your office computer to your Virtual Private Servers (which can be quite slow on a 28.8), you can telnet to your Virtual Private Servers and FTP the software from XYZ, Inc. directly to your Virtual Private Servers (using high speed DS3's).

  2. Connect to a Remote FTP Site
    To open an FTP session with a remote FTP site at a command prompt simply type "ftp [remote host]", where [remote host] is the site you are attempting to contact (i.e. ftp.xyz.com). This is where is gets fun because you know can see what's going on "behind the scenes" when you were using a graphical FTP client. When you open an FTP session with a remote host, you will more than likely be prompted for a username and password pair (sounds logical enough).

  3. Navigate
    After you have successfully logged into the remote ftp site, you can navigate around using the "cd" command to change your current working directory on the remote site. Type "ls" or "dir" to list the files in your current working directory on the remote site.

  4. Upload Files
    To upload from your local machine (or the machine from which you initiated the FTP session) to the remote host, you use the command "put". For example, to upload a file in your local working directory named "index.html" to your current working directory on the remote site, you would type "put index.html test.html". This will transfer the file "index.html" to the remote host and store it under the name "test.html". If you would like to store the local file as the same name on the remote host simply type something like "put index.html index.html" or simply "put index.html". To upload multiple files, use the command "mput" using wildcards such as "mput *.html". You may want to turn off the confirm prompt by typing the command "prompt" before you upload multiple files.

  5. Download Files
    To download content from a remote host (or the machine to which you opened the FTP session) to your local machine, you use the command "get". For example, to download a file to your local working directory named "test.html" from your current working directory on the remote site, you would type "get test.html index.html". This will transfer the file "test.html" from the remote host and store it under the name "index.html" on your local computer. To download multiple files, use the command "mget" using wildcards such as "mget *.html". You may want to turn off the confirm prompt by typing the command "prompt" before you download multiple files.

    NOTE: Be sure you transfer all text files, such as HTML and CGI script source code, in ASCII format! All image files (.gif, .jpg, etc.) must be transferred in BINARY format.

     

Commands
Other important FTP commands are summarized in the table below. Arguments for commands are indicated using brackets [ ]:

ascii Set the file transfer type to network ASCII.
binary Set the file transfer type to support binary image transfer.
bye
quit
Terminate the FTP session with the remote server and exit ftp. An end of file will also terminate the session and exit.
cd [remote-directory]
Change the working directory on the remote machine to remote-directory.
delete [remote-file]
Delete the file remote-file on the remote machine.
dir
ls
[remote-directory]
Print a listing of the directory contents in the directory, remote-directory. If no remote directory is specified, a listing of the current working directory on the remote machine is shown.
get [remote-file] [local-file]
Retrieve the remote-file and store it on the local machine. If the local file name is not specified, it is given the same name it has on the remote machine.
help [command]
Print an informative message about the meaning of command. If no argument is given, ftp prints a list of the known commands.
lcd [local-directory]
Change the working directory on the local machine. If no directory is specified, the user's current local working directory is displayed.
mdelete [remote-files]
Delete the remote-files on the remote machine.
mget [remote-files]
Expand the remote-files on the remote machine and do a get for each file name thus produced.
mkdir [remote-directory]
Make a directory on the remote machine.
mput [local-files]
Expand wild cards in the list of local files given as argu- ments and do a put for each file in the resulting list.
prompt Toggle interactive prompting. Interactive prompting occurs during multiple file transfers to allow the user to selec- tively retrieve or store files. If prompting is turned off (default is on), any mget or mput will transfer all files, and any mdelete will delete all files.
put [local-file] [remote-file]
Store a local file on the remote machine. If remote-file is left unspecified, the local file name is used.
rename [from] [to]
Rename the file from on the remote machine, to the file to.
rmdir [directory-name]
Delete a directory on the remote machine.


Toll Free 1-866-GSP-4400 • 1-301-464-9363 • service@gsp.com
Copyright © 1994-2016 GSP Services, Inc.