107 lines
5.5 KiB
HTML
107 lines
5.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
|
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
|
<HEAD>
|
|
<TITLE>C.3 Poking Around</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value="C.3 Poking Around">
|
|
<meta name="keywords" value="gs">
|
|
<meta name="resource-type" value="document">
|
|
<meta name="distribution" value="global">
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html4820 HREF="node239.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html4818 HREF="node235.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html4812 HREF="node237.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html4822 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html4823 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html4821 HREF="node239.html">C.4 Downloading files</A>
|
|
<B>Up:</B> <A NAME=tex2html4819 HREF="node235.html">C FTP Tutorial and </A>
|
|
<B> Previous:</B> <A NAME=tex2html4813 HREF="node237.html">C.2 Logging In</A>
|
|
<BR> <HR> <P>
|
|
<H1><A NAME=SECTION001030000000000000000>C.3 Poking Around</A></H1>
|
|
<P>
|
|
Okay, we're in. <tt>ftp></tt> is our prompt, and the <tt>ftp</tt> program is
|
|
waiting for commands. There are a few basic commands you need to know about.
|
|
First, the commands
|
|
<P><TT> ls <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img303.gif"> <P></TT>
|
|
and
|
|
<P><TT> dir <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img304.gif"> <P></TT>
|
|
both give file listings (where <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img305.gif">
|
|
is an optional argument
|
|
specifying a particular filename to list). The difference is that <tt>ls</tt>
|
|
usually gives a short listing and <tt>dir</tt> gives a longer listing (that
|
|
is, with more information on the sizes of the files, dates of modification,
|
|
and so on).
|
|
<P>
|
|
The command
|
|
<P><TT> cd <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img306.gif"> <P></TT>
|
|
will move to the given directory (just like the <tt>cd</tt> command on UNIX or
|
|
MS-DOS systems). You can use the command
|
|
<P><TT> cdup
|
|
<P></TT>
|
|
to change to the parent directory<A NAME=tex2html1100 HREF="footnode.html#6508"><IMG ALIGN=BOTTOM ALT="gif" SRC="foot_motif.gif"></A>.
|
|
<P>
|
|
The command
|
|
<P><TT> help <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img307.gif"> <P></TT>
|
|
will give help on the given <tt>ftp</tt> <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img308.gif">
|
|
(such as <tt>ls</tt> or
|
|
<tt>cd</tt>). If no command is specified, <tt>ftp</tt> will list all of the
|
|
available commands.
|
|
<P>
|
|
If we type <tt>dir</tt> at this point we'll see an initial directory
|
|
listing of where we are.
|
|
<P><TT> ftp> <em>dir</em> <BR>
|
|
200 PORT command successful. <BR>
|
|
150 Opening ASCII mode data connection for /bin/ls. <BR>
|
|
total 1337 <BR>
|
|
<PRE>dr-xr-xr-x 2 root wheel 512 Aug 13 13:55 bin
|
|
drwxr-xr-x 2 root wheel 512 Aug 13 13:58 dev
|
|
drwxr-xr-x 2 root wheel 512 Jan 25 17:35 etc
|
|
drwxr-xr-x 19 root wheel 1024 Jan 27 21:39 pub
|
|
drwxrwx-wx 4 root ftp-admi 1024 Feb 6 22:10 uploads
|
|
drwxr-xr-x 3 root wheel 512 Mar 11 1992 usr
|
|
</PRE>
|
|
226 Transfer complete. <BR>
|
|
921 bytes received in 0.24 seconds (3.7 Kbytes/s) <BR>
|
|
ftp>
|
|
<P></TT>
|
|
<P>
|
|
Each of these entries is a directory, not an individual file which we can
|
|
download (specified by the <tt>d</tt> in the first column of the listing).
|
|
On most FTP archive sites, the publicly available software is under the
|
|
directory <tt>/pub</tt>, so let's go there.
|
|
<P>
|
|
<P><TT> ftp> <em>cd pub</em> <BR>
|
|
ftp> <em>dir</em> <BR>
|
|
200 PORT command successful. <BR>
|
|
150 ASCII data connection for /bin/ls (128.84.181.1,4525) (0 bytes). <BR>
|
|
total 846 <BR>
|
|
<PRE>-rw-r--r-- 1 root staff 1433 Jul 12 1988 README
|
|
-r--r--r-- 1 3807 staff 15586 May 13 1991 US-DOMAIN.TXT.2
|
|
-rw-r--r-- 1 539 staff 52664 Feb 20 1991 altenergy.avail
|
|
-r--r--r-- 1 65534 65534 56456 Dec 17 1990 ataxx.tar.Z
|
|
-rw-r--r-- 1 root other 2013041 Jul 3 1991 gesyps.tar.Z
|
|
-rw-r--r-- 1 432 staff 41831 Jan 30 1989 gnexe.arc
|
|
-rw-rw-rw- 1 615 staff 50315 Apr 16 1992 linpack.tar.Z
|
|
-r--r--r-- 1 root wheel 12168 Dec 25 1990 localtime.o
|
|
-rw-r--r-- 1 root staff 7035 Aug 27 1986 manualslist.tblms
|
|
drwxr-xr-x 2 2195 staff 512 Mar 10 00:48 mdw
|
|
-rw-r--r-- 1 root staff 5593 Jul 19 1988 t.out.h
|
|
</PRE>
|
|
226 ASCII Transfer complete. <BR>
|
|
2443 bytes received in 0.35 seconds (6.8 Kbytes/s) <BR>
|
|
ftp>
|
|
<P></TT>
|
|
<P>
|
|
Here we can see a number of (interesting?) files, one of which is called
|
|
<tt>README</tt>, which we should download (most FTP sites have a <tt>README</tt>
|
|
file in the <tt>/pub</tt> directory).
|
|
<P>
|
|
<BR> <HR><A NAME=tex2html4820 HREF="node239.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A> <A NAME=tex2html4818 HREF="node235.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A> <A NAME=tex2html4812 HREF="node237.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <A NAME=tex2html4822 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="contents_motif.gif"></A> <A NAME=tex2html4823 HREF="node250.html"><IMG ALIGN=BOTTOM ALT="index" SRC="index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html4821 HREF="node239.html">C.4 Downloading files</A>
|
|
<B>Up:</B> <A NAME=tex2html4819 HREF="node235.html">C FTP Tutorial and </A>
|
|
<B> Previous:</B> <A NAME=tex2html4813 HREF="node237.html">C.2 Logging In</A>
|
|
<BR> <HR> <P>
|
|
<BR> <HR>
|
|
<P><ADDRESS>
|
|
<I>Matt Welsh <BR>
|
|
mdw@sunsite.unc.edu</I>
|
|
</ADDRESS>
|
|
</BODY>
|