Introduction to FTP Commands

Source: Internet
Author: User
Tags ftp commands ftp site file transfer protocol
  FTP Guide


============================

# FTP (short for File Transfer Protocol) are extremely useful for transferring
# files to and from another site.

# Usage:
% FTP site_name
(Enter User ID)
(Enter user password)

# Example:
% FTP gantt.stanford.edu
Ftp> Connected to Gantt.stanford.edu
gantt.stanford.edu FTP Server (Version 4.187 Wed Nov 17:08:58 EST 1990) ready.
Name (cn.ecn.purdue.edu:aec99): Aec99
331 Password required for aec99.
Password:xxxxxxxx
230 User Aec99 logged in.
Ftp> ... and you, are in.

# Usage (commands):
ftp> LS <-to list files in foreign host.
ftp> dir <-to list files in foreign host including date, size, etc.
Ftp>!command <-to run commands in the host you are on., e.g.!ls
Ftp> CD <-to change directory
ftp> ASC <-to set to text "mode for transfer" (for-text files only)
Ftp> bin <-to set to binary mode for transfer (for everything else-reccommended)
Ftp> bye <-to exit

# Transferring files:
# to transfer a file, with ' Get ' and ' send '. In the case of a binary file, the
# command ' bin ' has to is typed the host to receive the file.
# If not, strange things happen ... (to the file, which is). Text file can be
# transferred without problem using either text or binary modes.

# Usage:
Ftp> get file_name (Getting a text file)

ftp> send file_name (sending a text file)

Ftp> bin (Getting a binary file, e.g. xxx,gif, Xxx.exe, elm, etc)
221 set type to I <-host response
Ftp> get file_name

Ftp> bin (sending a binary file)
ftp> send file_name

# Sometimes, mass retrieval can be done by using ' mget '

# Usage:
Ftp> Mget Wild_card

# Example:
Ftp> mget new* (to get any file which start with ' new '.)

# to Exit ...
Ftp> bye

# publuc-access Ftp-sites:
# There are a number of public-accessible ftp-sites around InterNet. Many of
# them contain useful softwares (and even games and nice gifs!). These sites
# can be accessed as the following:

% FTP site_name
(User login:) anonymous
(User password/guest ID:) Your own login@machine

# Example:
% FTP ftp.cica.indiana.edu
Ftp> Connected to ftp.cica.indiana.edu.
6.16 FTP FTP server (Version Thu May 7 14:43:04 EST 1992) ready.
Name (Ftp.cica.indiana.edu:wai): Anonymous <------
331 Guest Login OK, send e-mail address as password.
password:wai@sage.cc.purdue.edu <------
230-**
230-** your have reached ftp.cica.indiana.edu [129.79.20.84] at
230-** the Center for innovative Computer applications (CICA) at
230-** Indiana University in Bloomington, Indiana USA.
230-** ..... [Lost of intro deleted]
230-**
230-
230 Guest Login OK, access restrictions apply.
Ftp>

# Here's a short list of only few of the many ftp-sites around:

# ftp.cica.indiana.edu-win3 Drivers & Programs
# me.uta.edu-engineering Programs
# media-lab.media.mit.edu 18.85.0.2 Misc Items
# monu6.cc.monash.edu.au 130.194.32.106 PC softwares + Win3 Drivers & Programs
# pit-manager.mit.edu-usenet infos, Newsgroups FAQs, etc.
# PROCYON.CIS.KSU.EDU-PC Softwares and MS-DOS based Unix Progs.
# utsun.s.u-tokyo.ac.jp 133.11.11.11 Misc items.
# uxc.cso.uiuc.edu 128.174.5.50 Misc usenet items.
# wuarchive.wustl.edu 128.252.135.4 Misc MS-DOS items.
# garbo.uwasa.fi-pc and Windows softwares (good)

# Have fun!

=============================================================================================================== ===



Here are the steps you with the to ftp a file.
Rev VMV 5/27/99
Rev VMV 03/01/01
Rev VMV 04/11/01

A) to FTP to A NODE on WHICH your HAVE an account:
For Wincenter account to UNIX, or
For Wincenter to Wincenter, go to (1)
For a ANONYMOUS LOGIN, go to (2)

In a Windows, CD to the directory where you want the "files to" is put in,
In your account. Or where the files are that you are sending to another
Account.

> CD Myspecialdir
> FTP nodename (FTP cadwhs01)

Login with username and password (your have to have the
node that, are getting a file from
or access privileges unless it is a
Anonymous account.

1) for Wincenter to UNIX or Wincenter to Wincenter

Start up the Citrix ICA Client for IRIX

% Wincenter

Go to Entry/connect
Ok
Go to the Start button/programs/command Prompt
CD to the directory for you want the files to either go.

EXAMPLE:
U:/users/vivianv> CD Ppdpamphlet
u:/users/vivianv/ppdpamphlet> FTP cadwhs01 (UNIX server where I account is)
User (cadwhs01.fnal.gov: (None)): Vivianv
Password Required for Vivianv
Password ************
User Vivianv logged in.

Ftp> CD dirwhere_the_files_are_located_or_copied_to

Ftp> Get name_of_file.ps OR
Ftp> put Name_of_file.ps

* When transferring files:
Drafting files need to is sent binary so you must specify "Bin" before
The transfer. Text files are send "ASCII", PostScript doesn ' t matter.

* If You receive a error when ftping from Wincenter to Wincenter, you
Would have to transfer your files from your A-Wincenter account to
An area in your UNIX account initially, and then ftp them from your
Second Wincenter account to the UNIX account.
-----------------------------------------------------------------------------
2 to FTP-A NODE with an ANONYMOUS LOGIN:

> CD Myspecialdir
> FTP ftp.sdrc.com (the anonymous site)

Login in with "Anonymous" and the password are your email address
Ie. Jimbo@fnal.gov

Once in, you can CD to the directory where the files are your are trying to
Get or send. You can does a dir to the where you are and where your want to go.

Once you are in the proper directory or area the following tells the proper
Syntax that should is used when transferring file.
-----------------------------------------------------------------------------
A) IF you ARE getting one FILE:

Ftp> CD dirname (CD to the directory where you are to get your file, like "pub")
Ftp> Bin (makes sure all transfers are in binary format)
(The only thing so uses ASCII is a text file)
ftp> get filename (ie. get assembly.dwg)

IF you ARE getting LOTS of FILES:

Ftp> bin
Ftp> Mget *.dwg (it'll ask you for if you want to get each file
Individually and your type either Y or N.
-----------------------------------------------------------------------------
B) IF you ARE sending one FILE:

Ftp> CD dirname (CD to the directory where you are to put your file, like "pub")
Ftp> bin
ftp> put filename (ie. put tankassy.dwg)
-----------------------------------------------------------------------------
C) IF you ARE sending LOTS of FILES:

Ftp> bin
Ftp> mput *.ps (put the extension of the "files" that you are putting in or
(use * If there are too many different kinds)

Note:
You can specify the file is named differently in your UNIX account if
You are are getting from a NT or PC. They typically have names that
Unix doesn ' t like, like ASSY$1.DWG or assy&hgr.dwg with spaces,
Like Hanger and ASSY.DWG. Unix recognizes symbols as what is used
For script writing and programming and are unable to parce spaces.

INSTEAD Use this SYNTAX:

Ftp> bin
ftp> get filename newfilename (get assy$1.dwg assembly1.dwg)
To change the ' file name ' when it's copying to your account.

*do not with Mget this WAY, it doesn ' T WORK.
-----------------------------------------------------------------------------
D) to QUIT:

ftp> FTP quit
-----------------------------------------------------------------------------
EXAMPLE:

You are sending a archive file to SDRC because you can ' t read it or
There is some other problem. They tell your name of their FTP site
is:
"Ftp.sdrc.com", your username is
"Customer" and your password is
"DIRTFT2P"
Your archive file in the directory named
"Incoming".
Here are the steps for you would take.

> FTP ftp.sdrc.com
> Customer
> dirtft2p
Ftp> CD Incoming
Ftp> bin
Ftp> put Scrambled_shaded_tube.arc
Ftp> quit

=============================================================================================================== ==


FTP has two modes to transfer Files:ascii mode and Binary mode.

The ASCII is a 7bit format, the last bit is always 0, and then only 7 bits are transferred in ASCII mode the 0 being appended to Create the full byte.

In binary the "is" and all 8 bit are transferred. If the file Bing transferred is ASCII to begin with you won ' t-a problem, but if you transfer a binary as ASCII it wil L become corrupted.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.