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

📄 030-032.html

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTML
字号:
<HTML>

<HEAD>

<TITLE>Linux Unleashed, Third Edition:Types of Linux</TITLE>

<SCRIPT>
<!--
function displayWindow(url, width, height) {
        var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>

 -->




<!--ISBN=0672313723//-->

<!--TITLE=Linux Unleashed, Third Edition//-->

<!--AUTHOR=Tim Parker//-->

<!--PUBLISHER=Macmillan Computer Publishing//-->

<!--IMPRINT=Sams//-->

<!--CHAPTER=2//-->

<!--PAGES=030-032//-->

<!--UNASSIGNED1//-->

<!--UNASSIGNED2//-->



<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="027-030.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="033-035.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>

<P><BR></P>

<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 <TT>ls</TT> or the DOS equivalent <TT>dir</TT>. To change to a subdirectory, use the <TT>cd</TT> <TT>&lt;dir&gt;</TT> command. To return to the parent directory (the one above the current directory), use the command <TT>cd &#133;</TT> Unlike Linux, there are no keyboard shortcuts available with FTP so you have to type in the names of files or directories in their entirety (and correctly).</P>

<P>As you move through the directories and find a file you want to move to your system, use the FTP <TT>get</TT> command, as in:</P>

<!-- CODE SNIP //-->

<PRE>

get &#147;file1.txt&#148;

</PRE>

<!-- END CODE SNIP //-->

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

<P>The quotation marks around filenames are optional for most versions of FTP, but they do provide specific characters to the remote version (preventing shell expansion). This can prevent error messages from FTP or accidental transfers of many files instead of just one, so quotation marks are a useful practice to employ.</P>

<P>When you issue a <TT>get</TT> 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. This is a sample transcript of a <TT>get</TT> command:</P>

<!-- CODE SNIP //-->

<PRE>

FTP&gt; get &#147;file1.txt&#148;

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).

</PRE>

<!-- END CODE SNIP //-->

<P>FTP provides two modes of file transfer: ASCII (7 bit characters) and Binary (8 bit characters). Some systems automatically switch between the two, although it is a good idea to manually set the mode to ensure you don&#146;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

</P>

<!-- CODE SNIP //-->

<PRE>

binary

</PRE>

<!-- END CODE SNIP //-->

<P>You can toggle back to ASCII mode with the command <TT>ASCII</TT>. 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.</P>

<BLOCKQUOTE>

<P><FONT SIZE="-1"><HR><B>Tip:&nbsp;&nbsp;</B><BR>If there are many files you want to transfer all at once and don&#146;t want to bother typing each file&#146;s name, use the <TT>mget</TT> command. Simply type <TT>mget</TT> and a wildcard, and an FTP prompt appears asking if it should transfer each file matching that name. For example, let&#146;s say &#147;<TT>mget *</TT>&#148; matches all the files in the directory; you&#146;ll be asked whether you want to get each one. To suppress the questions and force a transfer of each file that matches your wildcard, do so by entering the command <TT>prompt</TT>. This turns off the prompts and transfers all the matching files one after another.<HR></FONT>

</BLOCKQUOTE>

<P>To quit FTP, type the command <TT>quit</TT> or <TT>exit</TT>. Both commands close your session on the remote machine, then terminate FTP on your local machine.</P>

<P>Keep 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 alternative method since your connection will have to remain in place for many hours. Some remote sites limit the amount of time you can stay connected.</P>

<P><FONT SIZE="+1"><B>Linux FTP Archive Sites</B></FONT></P>

<P>The list of Linux FTP archive sites changes slowly, but the sites listed below were all valid and accessible as this book went to press. Many of these sites are mirror sites, providing exactly the same content as the primary sites. The primary sites (also called home sites) for the Linux FTP archives are <TT>tsx-11.mit.edu</TT>, <TT>sunsite.unc.edu</TT>, and <TT>nic.funet.fi</TT>. Home sites are where most of the new software loads begin. The majority of sites on the previous list mirrors one of these three sites.</P>

<P>The site nearest you can be found by using the country identifier at the end of the site name (uk=United Kingdom, fr=France, and so on). Most versions of FTP allow either the machine name or the IP address to be used, although if the name cannot be interpreted by the local Internet gateway, the IP address is the best addressing method. Make sure you enter the four components of the IP address correctly. Table 2.1 shows the sites that were good sources of Linux material as this book went to press.</P>

<TABLE WIDTH="100%"><CAPTION ALIGN=LEFT><B>Table 2.1.</B> Linux FTP sites and their IP addresses.

<TR>

<TH COLSPAN="3"><HR>

<TR>

<TH WIDTH="45%" ALIGN="LEFT">Site name

<TH WIDTH="30%" ALIGN="LEFT">IP address

<TH WIDTH="25%" ALIGN="LEFT">Directory

<TR>

<TH COLSPAN="3"><HR>

<TR>

<TD><TT>tsx-11.mit.edu</TT>

<TD>18.172.1.2

<TD>/pub/linux

<TR>

<TD><TT>sunsite.unc.edu</TT>

<TD>152.2.22.81

<TD>/pub/Linux

<TR>

<TD><TT>nic.funet.fi</TT>

<TD>128.214.6.100

<TD>/pub/OS/Linux

<TR>

<TD><TT>ftp.mcc.ac.uk</TT>

<TD>130.88.200.7

<TD>/pub/linux

<TR>

<TD><TT>fgbl.fgb.mw.tu-muenchen.de</TT>

<TD>129.187.200.1

<TD>/pub/linux

<TR>

<TD><TT>ftp.infdrrnatik.twmuenchen.de</TT>

<TD>131.159.0.110

<TD>/pub/Linux

<TR>

<TD><TT>ftp.dfv.rwth-aachen.de</TT>

<TD>137.226.4.105

<TD>/pub/linux

<TR>

<TD><TT>ftp.informatik.rwth-aachen.de</TT>

<TD>137.226.112.172

<TD>/pub/Linux

<TR>

<TD><TT>ftp.ibp.fr</TT>

<TD>132.227.60.2

<TD>/pub/linux

<TR>

<TD><TT>kirk.bu.oz.au</TT>

<TD>131.244.1.1

<TD>/pub/OS/Linux

<TR>

<TD><TT>ftp.uu.net</TT>

<TD>137.39.1.9

<TD>/systems/unix/ linux

<TR>

<TD><TT>wuarchive.wustl.edu</TT>

<TD>128.252.135.4

<TD>/systems/linux

<TR>

<TD><TT>ftp.win.tue.nl</TT>

<TD>131.155.70.100

<TD>/pub/linux

<TR>

<TD><TT>ftp.stack.urc.tue.nl</TT>

<TD>131.155.2.71

<TD>/pub/linux

<TR>

<TD><TT>ftp.ibr.cs.tu-bs.de</TT>

<TD>134.169.34.15

<TD>/pub/os/linux

<TR>

<TD><TT>ftp.denet.dk</TT>

<TD>129.142.6.74

<TD>/pub/OS/linux

<TR>

<TD COLSPAN="3"><HR>

</TABLE>

<P>If you encounter difficulties connecting to one site, try another. If difficulties persist, there may be a problem with your access to the Internet.

</P><P><BR></P>

<CENTER>

<TABLE BORDER>

<TR>

<TD><A HREF="027-030.html">Previous</A></TD>

<TD><A HREF="../ewtoc.html">Table of Contents</A></TD>

<TD><A HREF="033-035.html">Next</A></TD>

</TR>

</TABLE>

</CENTER>





</td>
</tr>
</table>

<!-- begin footer information -->





</body></html>

⌨️ 快捷键说明

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