⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsg02.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 4 页
字号:
<BR>







<BR>







<PRE>







<FONT COLOR="#000080"><A HREF="ftp://ftp sunsite.unc.edu">ftp sunsite.unc.edu</A></FONT></PRE>







<P>If you are using an on-line service such as CompuServe of Delphi, you must access their Internet service and invoke FTP from there. Most on-line services let you to enter the name of the FTP site at a prompt.







<BR>







<P>When you issue the ftp command, your system attempts to connect to the remote machine. When it completes the connection successfully, the remote machine prompts you for a user ID. You must have a valid user ID and password for that system unless it supports anonymous FTP (which all Linux FTP sites do). If anonymous FTP is supported on the remote system, a message usually tells you that when you first connect.







<BR>







<P>The following login is for the Linux FTP archive site <A HREF="ftp://ftp sunsite.unc.edu">sunsite.unc.edu</A>, one of the most popular sites:







<BR>







<PRE>







<FONT COLOR="#000080">ftp sunsite.unc.edu







331 Guest login ok, send your complete e-mail address as password.







Enter username (default: anonymous): anonymous







Enter password [tparker@tpci.com]:







|FTP| Open







230- WELCOME to UNC and SUN's anonymous ftp server







230- University of North Carolina







230- Office FOR Information Technology







230- SunSITE.unc.edu







230 Guest login ok, access restrictions apply.







FTP&gt;</FONT></PRE>







<P>The login for an anonymous FTP site is usually guest or anonymous. The login message usually tells you which is used, or you can try both. The remote machine will prompt you for a password in most cases. You don't have to supply one with some systems, and others ask for your user name or ID. This information is used for tracking purposes only and has no security problems associated with it (unless you don't have a password on your account!).







<BR>







<P>After the login process is finished, you see the prompt FTP&gt;. This prompt indicates that the system is ready to accept FTP commands. Some systems display a short message when you log in that may contain instructions for downloading files as well as any restrictions that are placed on you as an anonymous FTP user. Other information may be displayed about the location of useful files. For example, you may see messages like this one from the FTP site sunsite.unc.edu:







<BR>







<PRE>







<FONT COLOR="#000080">To get a binary file, type: BINARY and then: GET &quot;File.Name&quot; newfilename







To get a text file, type: ASCII and then: GET &quot;File.Name&quot; newfilename







Names MUST match upper, lower case exactly. Use the &quot;quotes&quot; as shown.







To get a directory, type: DIR. To change directory, type: CD &quot;Dir.Name&quot;







To read a short text file, type: GET &quot;File.Name&quot; TT







For more, type HELP or see FAQ in gopher.







To quit, type EXIT or Control-Z.







230- If you email to info@sunsite.unc.edu you will be sent help information







230- about how to use the different services sunsite provides.







230- We use the Wuarchive experimental ftpd. if you &quot;get&quot; &lt;directory&gt;.tar.Z







230- or &lt;file&gt;.Z it will compress and/or tar it on the fly. Using &quot;.gz&quot; instead







230- of &quot;.Z&quot; will use the GNU zip (/pub/gnu/gzip*) instead, a superior







230- compression method.</FONT></PRE>







<P>Once you are on the remote system, you can use Linux (UNIX) commands to display file contents and move around directories. To display the contents of a directory, use the command ls or the DOS equivalent dir. To change to a subdirectory, use the cd &lt;dir&gt; command. To return to the parent directory (the one above the current directory), use the command cd ... Unlike Linux, no keyboard shortcuts are available with FTP so you will have to type in the name of files or directories in their entirety (and correctly).







<BR>







<P>When you have moved through the directories and found a file you want to move back to your system, use the FTP get command, as shown in the following code:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">get &quot;file1.txt&quot;</FONT></PRE>







<BLOCKQUOTE>







<BLOCKQUOTE>







<HR ALIGN=CENTER>







<BR>







<NOTE>Although quotation marks around filenames are optional for most versions of FTP, they do provide specific characters to the remote version, thereby preventing shell expansion. Using quotation marks can prevent accidental transfers of many files instead of just one or error messages from FTP.</NOTE>







<BR>







<HR ALIGN=CENTER>







</BLOCKQUOTE></BLOCKQUOTE>







<P>The commands get (download) and put (upload) are relative to your home machine, not to the remote. When you issue a get command, you are telling your system's FTP software to get a file from the remote machine. A put command tells FTP to put a file from your local machine onto the remote machine. Remember which command moves in which direction, or you could overwrite files accidentally.







<BR>







<P>When you issue a get command, the remote system transfers data to your local machine and displays a status message when it is completed. There is no indication of progress during transmission of a large file, so be patient. The following is a sample transcript of a get command:







<BR>







<PRE>







<FONT COLOR="#000080">FTP&gt; get &quot;file1.txt&quot;







200 PORT command successful.







150 BINARY data connection for FILE1.TXT (27534 bytes)







226 BINARY Transfer complete.







27534 bytes received in 2.35 seconds (12 Kbytes/s).</FONT></PRE>







<P>FTP provides two modes of file transfer: ASCII (seven-bit characters) and Binary (eight-bit characters). Some systems automatically switch between the two, although it is a good idea to manually set the mode to ensure that you don't waste time. You must download all Linux distribution files in Binary mode. To set FTP in Binary transfer mode (for any executable file), type the command binary. You can toggle back to ASCII mode with the command ASCII. If you transfer a binary file in ASCII mode, it will not be executable. Transferring an ASCII file in Binary mode does not affect the contents of the file, so Binary is a good default transfer mode.







<BR>







<P>Bear in mind that the Linux archives are quite sizable, and transferring even a small distribution can take a while with asynchronous modems. If you use a slow modem (9,600 baud or less), you may want to consider an alternate method as you will have to stay connected for many hours. Some remote sites limit the amount of time you can stay connected. To quit FTP, type the command quit or exit. Both commands will close your session on the remote machine. Then terminate FTP on your local machine.







<BR>







<BR>







<A NAME="E70E2"></A>







<H5 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Locating Linux FTP Archive Sites</B></FONT></CENTER></H5>







<BR>







<P>The list of Linux FTP archive sites changes slowly, but the sites listed in this section were all valid and reachable when this book was written. Many of these sites are mirror sites, providing exactly the same contents. You can find the site nearest you by looking at the country identifier at the end of the site name (uk=United Kingdom, fr=France, and so on). If no country identifier is used, the site is most probably in the U.S. With most versions of FTP, you can use either the site name or the IP address, although the IP address is the best addressing method if the local Internet gateway cannot resolve the site name. Make sure you enter the four components of the IP address correctly.







<BR>







<P>The primary sites (also called home sites) for the Linux FTP archives are tsx-11.mit.edu, sunsite.unc.edu, and nic.funet.fi. Home sites are where most of the new software loads begin. The majority of sites in the following list mirror one of these three sites. If you encounter difficulties connecting to a site, try another. If difficulties persist, there may be a problem with your access to the Internet.







<BR>















<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Site name







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







IP Address







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Directory







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://tsx-11.mit.edu">tsx-11.mit.edu</A>







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







18.172.1.2







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://sunsite.unc.edu">sunsite.unc.edu</A>







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







152.2.22.81







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/Linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://nic.funet.fi">nic.funet.fi</A>(Finland)







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







128.214.6.100







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/OS/Linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://ftp.mcc.ac.uk">ftp.mcc.ac.uk</A>(U.K.)







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







130.88.200.7







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://fgbl.fgb.mw.tu-muenchen.de">fgbl.fgb.mw.tu-muenchen.de</A>(Denmark)







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







129.187.200.1







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://ftp.infdrrnatik.twmuenchen.de">ftp.infdrrnatik.twmuenchen.de</A>(Denmark)







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







131.159.0.110







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/Linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://ftp.dfv.rwth-aachen.de">ftp.dfv.rwth-aachen.de</A>(Denmark)







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







137.226.4.105







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://ftp.informatik.rwth-aachen.de">ftp.informatik.rwth-aachen.de</A>(Denmark)







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







137.226.112.172







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/Linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://ftp.ibp.fr">ftp.ibp.fr</A>(France)







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







132.227.60.2







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://kirk.bu.oz.au">kirk.bu.oz.au</A>(Australia)







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







131.244.1.1







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







/pub/OS/Linux







</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







<A HREF="ftp://ftp.uu.net">ftp.uu.net</A>







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







137.39.1.9







</FONT>







⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -