<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Information Retrieval Blog &#187; Linux</title>
	<atom:link href="http://blog.zye.me/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.zye.me</link>
	<description>REAL TIME DATA PROCESSING, DISTRIBUTED COMPUTING, PATTERN DISCOVERY</description>
	<lastBuildDate>Tue, 31 Jan 2012 02:05:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Figure format conversion in Linux</title>
		<link>http://blog.zye.me/2010/02/55549.html</link>
		<comments>http://blog.zye.me/2010/02/55549.html#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:54:20 +0000</pubDate>
		<dc:creator>yezheng</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Figure]]></category>

		<guid isPermaLink="false">http://blog.so8848.com/?p=55549</guid>
		<description><![CDATA[EPS 2 PNG Manual conversion Open the file in the GIMP (make sure you have ghostscript installed! — Windows Ghostscript installation instructions) Enter 500 in the &#8220;resolution&#8221; input box You may need to uncheck &#8220;try bounding box&#8221;, since the bounding box sometimes cuts off part of the image. Enter large values for Height and Width if not using the bounding <a href='http://blog.zye.me/2010/02/55549.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h2>EPS 2 PNG</h2>
<h4>Manual conversion</h4>
<ol>
<li>Open the file in the <a title="w:GIMP" href="http://en.wikipedia.org/wiki/GIMP">GIMP</a> (make sure you have <a title="w:ghostscript" href="http://en.wikipedia.org/wiki/ghostscript">ghostscript</a> installed! — <a rel="nofollow" href="http://www.kirchgessner.net/gimp.html#PSGS">Windows Ghostscript installation instructions</a>)
<ul>
<li>Enter 500 in the &#8220;resolution&#8221; input box</li>
<li>You may need to uncheck &#8220;try bounding box&#8221;, since the bounding box sometimes cuts off part of the image.
<ul>
<li>Enter large values for <em>Height</em> and <em>Width</em> if not using the bounding box</li>
</ul>
</li>
<li>Select color</li>
<li>Select strong anti-aliasing for both graphics and text</li>
</ul>
</li>
<li>Crop off extra whitespace (shift+C if you can&#8217;t find it in the toolbox)</li>
<li><em>Image</em> → <em>Transform</em> → Rotate 90 degrees clockwise</li>
<li><em>Filters</em> → <em>Blur</em> → <em><a title="w:Gaussian blurred" href="http://en.wikipedia.org/wiki/Gaussian_blurred">Gaussian blur</a></em> (No need to blur if you use strong anti-aliasing during conversion. No significant difference between end results.)
<ul>
<li>2.0 px</li>
</ul>
</li>
<li><em>Image</em> → <em>Scale Image&#8230;</em>
<ul>
<li>25%</li>
<li>Cubic interpolation</li>
</ul>
</li>
<li>You can view at normal size if you want by pressing 1, Ctrl+E</li>
<li>Save as <em>File_name.png</em></li>
</ol>
<ul>
<li><a rel="nofollow" href="http://docs.gimp.org/en/">The GIMP documentation</a></li>
</ul>
<h4>Command-line method</h4>
<p>Another route to convert a PS or EPS file (postscript) in png is to use <a title="ImageMagick" href="/wiki/ImageMagick">ImageMagick</a>, available on many <a title="Operating system" href="/wiki/Operating_system">operating systems</a>. A single command is needed:</p>
<pre>convert -density 300 file.ps file.png</pre>
<p>The <strong>density parameter is the output resolutio</strong>n, expressed in <a title="Dots per inch" href="/wiki/Dots_per_inch">dots per inch</a>. With the standard 5&#215;3.5in size of a gnuplot graph, this results in a 1500&#215;1050 pixels PNG image. ImageMagick automatically applies antialiasing, so no post-processing is needed, making this technique especially suited to batch processing. The following <a title="Makefile" href="/wiki/Makefile">Makefile</a> automatically compiles all gnuplot files in a directory to EPS figures, converts them to PNG and then clears the intermediate EPS files. It assumes that all gnuplot files have a &#8220;.plt&#8221; extension and that they produce an EPS file with the same name, and the &#8220;.eps&#8221; extension:</p>
<pre><span style="color: #808080;">GNUPLOT_FILES = $(wildcard *.plt)
# create the target file list by substituting the extensions of the plt files
FICHIERS_PNG = $(patsubst %.plt,%.png,  $(GNUPLOT_FILES))

all: $(FICHIERS_PNG)

%.eps: %.plt
	@ echo "compillation of "$&lt;
	@gnuplot $&lt;

%.png: %.eps
	@echo "conversion in png format"
	@convert -density 300 $&lt; $*.png
	@echo "end"</span></pre>
<pre><span style="color: #808080;">
</span></pre>
<pre><span style="color: #808080;"><strong>What is EPS file format?</strong>
</span></pre>
<p>Encapsulated PostScript (EPS) is a standard file format for importing and exporting PostScript files. It is usually a single page PostScript program that describes an illustration or an entire page. The purpose of an EPS file is to be included in other pages. Sometimes EPS files are called EPSF files. EPSF simply stands for Encapsulated PostScript Format.</p>
<p>An EPS file can contain any combination of text, graphics and images. Since it is actually a PostScript file, it is one of the most versatile file formats that are available. EPS-files usually contain a small preview image that is used to visualize the content of the file.</p>
<h2><span style="color: #000000;">See also: </span></h2>
<pre><span style="color: #808080;">   <a href="http://mintaka.sdsu.edu/GF/bibliog/latex/PSandPNG.html">http://mintaka.sdsu.edu/GF/bibliog/latex/PSandPNG.html</a></span></pre>
<pre>   <a href="http://electron.mit.edu/~gsteele/pdf/">http://electron.mit.edu/~gsteele/pdf/</a></pre>
<pre><span style="color: #808080;">
</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.zye.me/2010/02/55549.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>命令行解压＆压缩 全集 &#8211;Linux</title>
		<link>http://blog.zye.me/2010/02/55539.html</link>
		<comments>http://blog.zye.me/2010/02/55539.html#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:25:35 +0000</pubDate>
		<dc:creator>yezheng</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[compress]]></category>

		<guid isPermaLink="false">http://blog.so8848.com/?p=55539</guid>
		<description><![CDATA[﻿﻿Commands for Compress and Decompress .tar 解包： tar xvf FileName.tar 打包：tar cvf FileName.tar DirName （注：tar是打包，不是压缩！） &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; .gz 解压1：gunzip FileName.gz 解压2：gzip -d FileName.gz 压缩：gzip FileName .tar.gz 解压：tar zxvf FileName.tar.gz 压缩：tar zcvf FileName.tar.gz DirName &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; .bz2 解压1：bzip2 -d FileName.bz2 解压2：bunzip2 FileName.bz2 压缩： bzip2 -z FileName .tar.bz2 解压：tar jxvf FileName.tar.bz2 压缩：tar jcvf FileName.tar.bz2 DirName &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; .bz 解压1：bzip2 -d <a href='http://blog.zye.me/2010/02/55539.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><strong>﻿﻿Commands for Compress and Decompress</strong></p>
<div>
<h2><strong>.tar</strong></h2>
<div><strong> </strong><br />
解包： tar xvf FileName.tar<br />
打包：tar cvf FileName.tar DirName<br />
（注：tar是打包，不是压缩！）<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.gz</h2>
<div>解压1：gunzip FileName.gz<br />
解压2：gzip -d FileName.gz<br />
压缩：gzip FileName<br />
.tar.gz<br />
解压：tar zxvf FileName.tar.gz<br />
压缩：tar zcvf FileName.tar.gz DirName</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.bz2</h2>
<div>解压1：bzip2 -d FileName.bz2<br />
解压2：bunzip2 FileName.bz2<br />
压缩： bzip2 -z FileName<br />
.tar.bz2<br />
解压：tar jxvf FileName.tar.bz2<br />
压缩：tar jcvf FileName.tar.bz2 DirName</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.bz</h2>
<div>解压1：bzip2 -d FileName.bz<br />
解压2：bunzip2 FileName.bz<br />
压缩：未知<br />
.tar.bz<br />
解压：tar jxvf FileName.tar.bz<br />
压缩：未知<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.Z</h2>
<div>解压：uncompress FileName.Z<br />
压缩：compress FileName<br />
.tar.Z<br />
解压：tar Zxvf FileName.tar.Z<br />
压缩：tar Zcvf FileName.tar.Z DirName</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.tgz</h2>
<div>解压：tar zxvf FileName.tgz<br />
压缩：未知<br />
.tar.tgz<br />
解压：tar zxvf FileName.tar.tgz<br />
压缩：tar zcvf FileName.tar.tgz FileName<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.zip</h2>
<div>解压：unzip FileName.zip<br />
压缩：zip FileName.zip DirName</div>
<div><strong>compress a directory</strong></div>
<div>zip -r FileName.zip DirName<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.rar</h2>
<div>解压：rar a FileName.rar<br />
压缩：r ar e FileName.rar</div>
<div>rar请到：<a rel="nofollow" href="http://www.rarsoft.com/download.htm">http://www.rarsoft.com/download.htm</a> 下载！<br />
解压后请将rar_static拷贝到/usr/bin目录（其他由$PATH环境变量指定的目录也可以）：<br />
[root@www2 tmp]# cp rar_static /usr/bin/rar<br />
command: unrar<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.lha</h2>
<div>解压：lha -e FileName.lha<br />
压缩：lha -a FileName.lha FileName</div>
<div>lha请到：<a rel="nofollow" href="http://www.infor.kanazawa-it.ac.jp/.../lhaunix/">http://www.infor.kanazawa-it.ac.jp/&#8230;/lhaunix/</a>下载！<br />
&gt;解压后请将lha拷贝到/usr/bin目录（其他由$PATH环境变量指定的目录也可以）：<br />
[root@www2 tmp]# cp lha /usr/bin/<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</div>
<h2>.rpm</h2>
<div>解包：rpm2cpio FileName.rpm | cpio -div</div>
<div>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
.tar .tgz .tar.gz .tar.Z .tar.bz .tar.bz2 .zip .cpio .rpm .deb .slp .arj .rar .ace .lha .lzh<br />
.lzx .lzs .arc .sda .sfx .lnx .zoo .cab .kar .cpt .pit .sit .sea<br />
解压：sEx x FileName.*<br />
压缩：sEx a FileName.* FileName</div>
<div>sEx只是调用相关程序，本身并无压缩、解压功能，请注意！<br />
sEx请到： <a rel="nofollow" href="http://sourceforge.net/projects/sex">http://sourceforge.net/projects/sex</a>下载！<br />
解压后请将sEx拷贝到/usr/bin目录（其他由$PATH环境变量指定的目录也可以）：<br />
[root@www2 tmp]# cp sEx /usr/bin/</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.zye.me/2010/02/55539.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vi/vim command summary</title>
		<link>http://blog.zye.me/2009/11/55463.html</link>
		<comments>http://blog.zye.me/2009/11/55463.html#comments</comments>
		<pubDate>Sat, 28 Nov 2009 20:33:50 +0000</pubDate>
		<dc:creator>yezheng</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[vi]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.so8848.com/?p=55463</guid>
		<description><![CDATA[vi/vim command summary The following tables contain all the basic vi commands. Starting vi Command Description vi file start at line 1 of file vi +n file start at line n of file vi + file start at last line of file vi +/pattern file start at pattern in file vi -r file recover file after a system crash Saving files and quitting vi Command Description :e file <a href='http://blog.zye.me/2009/11/55463.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<div><span></p>
<h1><span style="font-size: small;">vi/vim command summary</span></h1>
<p><span style="font-size: small;"><a name="0001"></a>The following tables contain all the basic <strong>vi</strong> commands.<br />
<a name="0002"></a></span><span style="font-size: small;"><strong>Starting vi</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Command</span></th>
<th align="LEFT"><span style="font-size: small;">Description</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">vi <strong><em>file</em></strong></span></td>
<td><span style="font-size: small;">start at line 1 of <strong><em>file</em></strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">vi +n <strong><em>file</em></strong></span></td>
<td><span style="font-size: small;">start at line <strong><em>n</em></strong> of <strong><em>file</em></strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">vi + <strong><em>file</em></strong></span></td>
<td><span style="font-size: small;">start at last line of <strong><em>file</em></strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">vi +/<strong><em>pattern</em></strong> <strong><em>file</em></strong></span></td>
<td><span style="font-size: small;">start at <strong><em>pattern</em></strong> in <strong><em>file</em></strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">vi -r <strong><em>file</em></strong></span></td>
<td><span style="font-size: small;">recover <strong><em>file</em></strong> after a system crash</span></td>
</tr>
</tbody>
</table>
<p><a name="0003"></a><a name="0004"></a><a name="0005"></a></p>
<p><span style="font-size: small;"><strong>Saving files and quitting vi</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Command</span></th>
<th align="LEFT"><span style="font-size: small;">Description</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:e <strong><em>file</em></strong></span></td>
<td><span style="font-size: small;">edit <strong><em>file</em></strong> (save current file with <strong>:w</strong> first)</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:w</span></td>
<td><span style="font-size: small;">save (write out) the file being edited</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:w <strong><em>file</em></strong></span></td>
<td><span style="font-size: small;">save as <strong><em>file</em></strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:w! <strong><em>file</em></strong></span></td>
<td><span style="font-size: small;">save as an existing <strong><em>file</em></strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:q</span></td>
<td><span style="font-size: small;">quit <strong>vi</strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:wq</span></td>
<td><span style="font-size: small;">save the file and quit <strong>vi</strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;"> <img src='http://blog.zye.me/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> </span></td>
<td><span style="font-size: small;">save the file if it has changed and quit <strong>vi</strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:q!</span></td>
<td><span style="font-size: small;">quit <strong>vi</strong> without saving changes</span></td>
</tr>
</tbody>
</table>
<p><a name="0006"></a></p>
<p><span style="font-size: small;"><strong>Moving the cursor</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Keys pressed</span></th>
<th align="LEFT"><span style="font-size: small;">Effect</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">h</span></td>
<td><span style="font-size: small;">left one character</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">l or &lt;Space&gt;</span></td>
<td><span style="font-size: small;">right one character</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">k</span></td>
<td><span style="font-size: small;">up one line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">j or &lt;Enter&gt;</span></td>
<td><span style="font-size: small;">down one line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">b</span></td>
<td><span style="font-size: small;">left one word</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">w</span></td>
<td><span style="font-size: small;">right one word</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">(</span></td>
<td><span style="font-size: small;">start of sentence</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">)</span></td>
<td><span style="font-size: small;">end of sentence</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">{</span></td>
<td><span style="font-size: small;">start of paragraph</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">}</span></td>
<td><span style="font-size: small;">end of paragraph</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">1G</span></td>
<td><span style="font-size: small;">top of file</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;"><strong><em>n</em></strong>G</span></td>
<td><span style="font-size: small;">line <strong><em>n</em></strong></span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">G</span></td>
<td><span style="font-size: small;">end of file</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&lt;Ctrl&gt;W</span></td>
<td><span style="font-size: small;">first character of insertion</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&lt;Ctrl&gt;U</span></td>
<td><span style="font-size: small;">up ½ screen</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&lt;Ctrl&gt;D</span></td>
<td><span style="font-size: small;">down ½ screen</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&lt;Ctrl&gt;B</span></td>
<td><span style="font-size: small;">up one screen</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&lt;Ctrl&gt;F</span></td>
<td><span style="font-size: small;">down one screen</span></td>
</tr>
</tbody>
</table>
<p><a name="0007"></a></p>
<p><span style="font-size: small;"><strong>Inserting text</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Keys pressed</span></th>
<th align="LEFT"><span style="font-size: small;">Text inserted</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">a</span></td>
<td><span style="font-size: small;">after the cursor</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">A</span></td>
<td><span style="font-size: small;">after last character on the line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">i</span></td>
<td><span style="font-size: small;">before the cursor</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">I</span></td>
<td><span style="font-size: small;">before first character on the line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">o</span></td>
<td><span style="font-size: small;">open line below current line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">O</span></td>
<td><span style="font-size: small;">open line above current line</span></td>
</tr>
</tbody>
</table>
<p><a name="0008"></a></p>
<p><span style="font-size: small;"><strong>Changing and replacing text</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Keys pressed</span></th>
<th align="LEFT"><span style="font-size: small;">Text changed or replaced</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">cw</span></td>
<td><span style="font-size: small;">word</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">3cw</span></td>
<td><span style="font-size: small;">three words</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">cc</span></td>
<td><span style="font-size: small;">current line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">5cc</span></td>
<td><span style="font-size: small;">five lines</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">r</span></td>
<td><span style="font-size: small;">current character only</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">R</span></td>
<td><span style="font-size: small;">current character and those to its right</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">s</span></td>
<td><span style="font-size: small;">current character</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">S</span></td>
<td><span style="font-size: small;">current line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">~</span></td>
<td><span style="font-size: small;">switch between lowercase and uppercase</span></td>
</tr>
</tbody>
</table>
<p><a name="0009"></a></p>
<p><span style="font-size: small;"><strong>Deleting text</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Keys pressed</span></th>
<th align="LEFT"><span style="font-size: small;">Text deleted</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">x</span></td>
<td><span style="font-size: small;">character under cursor</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">12x</span></td>
<td><span style="font-size: small;">12 characters</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">X</span></td>
<td><span style="font-size: small;">character to left of cursor</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">dw</span></td>
<td><span style="font-size: small;">word</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">3dw</span></td>
<td><span style="font-size: small;">three words</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">d0</span></td>
<td><span style="font-size: small;">to beginning of line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">d$</span></td>
<td><span style="font-size: small;">to end of line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">dd</span></td>
<td><span style="font-size: small;">current line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">5dd</span></td>
<td><span style="font-size: small;">five lines</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">d{</span></td>
<td><span style="font-size: small;">to beginning of paragraph</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">d}</span></td>
<td><span style="font-size: small;">to end of paragraph</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:1,. d</span></td>
<td><span style="font-size: small;">to beginning of file</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:.,$ d</span></td>
<td><span style="font-size: small;">to end of file</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:1,$ d</span></td>
<td><span style="font-size: small;">whole file</span></td>
</tr>
</tbody>
</table>
<p><a name="0010"></a><a name="0011"></a></p>
<p><span style="font-size: small;"><strong>Using markers and buffers</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Command</span></th>
<th align="LEFT"><span style="font-size: small;">Description</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">mf</span></td>
<td><span style="font-size: small;">set marker named &#8220;f&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">`f</span></td>
<td><span style="font-size: small;">go to marker &#8220;f&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">´f</span></td>
<td><span style="font-size: small;">go to start of line containing marker &#8220;f&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&#8220;s12yy</span></td>
<td><span style="font-size: small;">copy 12 lines into buffer &#8220;s&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&#8220;ty}</span></td>
<td><span style="font-size: small;">copy text from cursor to end of paragraph into buffer &#8220;t&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&#8220;ly1G</span></td>
<td><span style="font-size: small;">copy text from cursor to top of file into buffer &#8220;l&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&#8220;kd`f</span></td>
<td><span style="font-size: small;">cut text from cursor up to marker &#8220;f&#8221; into buffer &#8220;k&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&#8220;kp</span></td>
<td><span style="font-size: small;">paste buffer &#8220;k&#8221; into text</span></td>
</tr>
</tbody>
</table>
<p><a name="0012"></a></p>
<p><span style="font-size: small;"><strong>Searching for text</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Search</span></th>
<th align="LEFT"><span style="font-size: small;">Finds</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">/and</span></td>
<td><span style="font-size: small;">next occurrence of &#8220;and&#8221;, for example, &#8220;and&#8221;, &#8220;stand&#8221;, &#8220;grand&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">?and</span></td>
<td><span style="font-size: small;">previous occurrence of &#8220;and&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">/^The</span></td>
<td><span style="font-size: small;">next line that starts with &#8220;The&#8221;, for example, &#8220;The&#8221;, &#8220;Then&#8221;, &#8220;There&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">/^The&gt;</span></td>
<td><span style="font-size: small;">next line that starts with the word &#8220;The&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">/end$</span></td>
<td><span style="font-size: small;">next line that ends with &#8220;end&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">/[bB]ox</span></td>
<td><span style="font-size: small;">next occurrence of &#8220;box&#8221; or &#8220;Box&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">n</span></td>
<td><span style="font-size: small;">repeat the most recent search, in the same direction</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">N</span></td>
<td><span style="font-size: small;">repeat the most recent search, in the opposite direction</span></td>
</tr>
</tbody>
</table>
<p><a name="0013"></a></p>
<p><span style="font-size: small;"><strong>Searching for and replacing text</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Command</span></th>
<th align="LEFT"><span style="font-size: small;">Description</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:s/pear/peach/g</span></td>
<td><span style="font-size: small;">replace all occurrences of &#8220;pear&#8221; with &#8220;peach&#8221; on current line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:/orange/s//lemon/g</span></td>
<td><span style="font-size: small;">change all occurrences of &#8220;orange&#8221; into &#8220;lemon&#8221; on next line containing &#8220;orange&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:.,$/&lt;file/directory/g</span></td>
<td><span style="font-size: small;">replace all words starting with &#8220;file&#8221; by &#8220;directory&#8221; on every line from current line onward, for example, &#8220;filename&#8221; becomes &#8220;directoryname&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">:g/one/s//1/g</span></td>
<td><span style="font-size: small;">replace every occurrence of &#8220;one&#8221; with 1, for example, &#8220;oneself&#8221; becomes &#8220;1self&#8221;, &#8220;someone&#8221; becomes &#8220;some1&#8221;</span></td>
</tr>
</tbody>
</table>
<p><a name="0014"></a></p>
<p><span style="font-size: small;"><strong>Matching patterns of text</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Expression</span></th>
<th align="LEFT"><span style="font-size: small;">Matches</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">.</span></td>
<td><span style="font-size: small;">any single character</span></td>
</tr>
<tr valign="top">
<td><img src="graphics/lowast.gif" alt="*" /></td>
<td><span style="font-size: small;">zero or more of the previous expression</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">.<img src="graphics/lowast.gif" alt="*" /></span></td>
<td><span style="font-size: small;">zero or more arbitrary characters</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&lt;</span></td>
<td><span style="font-size: small;">beginning of a word</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">&gt;</span></td>
<td><span style="font-size: small;">end of a word</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;"></span></td>
<td><span style="font-size: small;">quote a special character</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;"><img src="graphics/lowast.gif" alt="*" /></span></td>
<td><span style="font-size: small;">the character &#8220;<img src="graphics/lowast.gif" alt="*" />&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">^</span></td>
<td><span style="font-size: small;">beginning of a line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">$</span></td>
<td><span style="font-size: small;">end of a line</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">[<strong><em>set</em></strong>]</span></td>
<td><span style="font-size: small;">one character from a set of characters</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">[XYZ]</span></td>
<td><span style="font-size: small;">one of the characters &#8220;X&#8221;, &#8220;Y&#8221;, or &#8220;Z&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">[[:upper:]][[:lower:]]*</span></td>
<td><span style="font-size: small;">one uppercase character followed by any number of lowercase characters</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">[^<strong><em>set</em></strong>]</span></td>
<td><span style="font-size: small;">one character not from a set of characters</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">[^XYZ[:digit:]]</span></td>
<td><span style="font-size: small;">any character except &#8220;X&#8221;, &#8220;Y&#8221;, &#8220;Z&#8221;, or a numeric digit</span></td>
</tr>
</tbody>
</table>
<p><span style="font-size: small;"><strong>Options to the :set command</strong></span></p>
<table border="0">
<tbody>
<tr valign="top">
<th align="LEFT"><span style="font-size: small;">Option</span></th>
<th align="LEFT"><span style="font-size: small;">Effect</span></th>
</tr>
<tr valign="top">
<td><span style="font-size: small;">all</span></td>
<td><span style="font-size: small;">list settings of all options</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">ignorecase</span></td>
<td><span style="font-size: small;">ignore case in searches</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">list</span></td>
<td><span style="font-size: small;">display &lt;Tab&gt; and end-of-line characters</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">mesg</span></td>
<td><span style="font-size: small;">display messages sent to your terminal</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">nowrapscan</span></td>
<td><span style="font-size: small;">prevent searches from wrapping round the end or beginning of a file</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">number</span></td>
<td><span style="font-size: small;">display line numbers</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">report=5</span></td>
<td><span style="font-size: small;">warn if five or more lines are changed by command</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">term=ansi</span></td>
<td><span style="font-size: small;">set terminal type to &#8220;ansi&#8221;</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">terse</span></td>
<td><span style="font-size: small;">shorten error messages</span></td>
</tr>
<tr valign="top">
<td><span style="font-size: small;">warn</span></td>
<td><span style="font-size: small;">display &#8220;[No write since last change]&#8221; on shell escape if file has not been saved</p>
<p></span></td>
</tr>
</tbody>
</table>
<p></span></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.zye.me/2009/11/55463.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Download Whole Website or Directories by using wget in Linux</title>
		<link>http://blog.zye.me/2009/09/54411.html</link>
		<comments>http://blog.zye.me/2009/09/54411.html#comments</comments>
		<pubDate>Sat, 19 Sep 2009 18:43:41 +0000</pubDate>
		<dc:creator>yezheng</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[crawler]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://blog.so8848.com/?p=54411</guid>
		<description><![CDATA[Download Whole Website or Directories by using wget in Linux You might have googled a software for downloading a specified website or directory on either Windows or Linux platform . Yes, a bunch of tools can do this for you. Actually, we can do this by using a simple command, wget, on Linux platform. It <a href='http://blog.zye.me/2009/09/54411.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<h1>Download Whole Website or Directories by using wget in Linux</h1>
<p>You might have googled a software for downloading a specified website or directory on either Windows or Linux platform . Yes, a bunch of tools can do this for you. Actually, we can do this by using a simple command, wget, on Linux platform. It is highly customizable, just a powerful crawler. You will find it fantastic and really cool. Let me just show you how!</p>
<p><strong>wget </strong></p>
<p><strong>&#8211;recursive </strong></p>
<p><strong>&#8211;no-clobber </strong></p>
<p><strong>&#8211;page-requisites </strong></p>
<p><strong>&#8211;html-extension </strong></p>
<p><strong>&#8211;convert-links </strong></p>
<p><strong>&#8211;restrict-file-names=windows </strong></p>
<p><strong>&#8211;domains techstroke.com </strong></p>
<p><strong>&#8211;no-parent </strong></p>
<p><strong>www.techstroke.com/Windows/</strong></p>
<p>The command above let you download the &#8220;windows&#8221; directory at the domain of &#8220;<strong>techstroke.com&#8221; </strong>recursively, starting from the url  <strong>www.techstroke.com/Windows/</strong></p>
<p>How do you like it? Hah, really cool?</p>
<p>Finally, let me explain a bit more about the parameters. Of course, you can refer to its documentation.</p>
<p><strong><span style="font-family: mceinline;"><span style="font-family: mceinline;">The options are:</span></span></strong></p>
<p><strong>–recursive: </strong>download the entire Web site.</p>
<p>–domains-techstroke.com: don’t follow links outside techstroke.com.</p>
<p>–no-parent: don’t follow links outside the directory /Windows/.</p>
<p>–page-requisites: get all the elements that compose the page (images, CSS and so on).</p>
<p>–html-extension: save files with the .html extension.</p>
<p>–convert-links: convert links so that they work locally, off-line.</p>
<p>–restrict-file-names=windows: modify filenames so that they will work in Windows as well.</p>
<p>–no-clobber: don’t overwrite any existing files (used in case the download is interrupted and</p>
<p>resumed).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zye.me/2009/09/54411.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SCP &#8211;copy among machines</title>
		<link>http://blog.zye.me/2009/08/53924.html</link>
		<comments>http://blog.zye.me/2009/08/53924.html#comments</comments>
		<pubDate>Fri, 07 Aug 2009 07:43:17 +0000</pubDate>
		<dc:creator>yezheng</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SCP]]></category>

		<guid isPermaLink="false">http://blog.so8848.com/?p=53924</guid>
		<description><![CDATA[SCP The scp command allows you to copy files over ssh connections. This is pretty useful if you want to transport files between computers, for example to backup something. The scp command uses the ssh command and they are very much alike. However, there are some important differences. The scp command can be used in <a href='http://blog.zye.me/2009/08/53924.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><strong>SCP</strong></p>
<p>The scp command allows you to copy files over ssh connections. This is pretty useful if you want to transport files between computers, for example to backup something. The scp command uses the ssh command and they are very much alike. However, there are some important differences.</p>
<p>The scp command can be used in three* ways: to copy from a (remote) server to your computer, to copy from your computer to a (remote) server, and to copy from a (remote) server to another (remote) server. In the third case, the data is transferred directly between the servers; your own computer will only tell the servers what to do. These options are very useful for a lot of things that require files to be transferred, so let&#8217;s have a look at the syntax of this command:</p>
<blockquote><p>[rechosen@localhost ~]$ scp examplefile yourusername@yourserver:/home/yourusername/</p></blockquote>
<p>Looks quite familiar, right? But there are differences. The command above will transfer the file &#8220;examplefile&#8221; to the directory &#8220;/home/yourusername/&#8221; at the server &#8220;yourserver&#8221;, trying to get ssh acces with the username &#8220;yourusername&#8221;. That&#8217;s quite a lot information, but scp really needs it all. Well, almost all of it. You could leave out the &#8220;yourusername@&#8221; in front of &#8220;yourserver&#8221;, but only if you want to login on the server with your current username on your own computer. Let&#8217;s have a closer look at the end of the command. There&#8217;s a colon over there, with a directory after it. Just like Linux&#8217;s normal cp command, scp will need to know both the source file(s) and the target directory (or file). For remote hosts, the file(s)/directory are given to the scp command is this way.</p>
<p>You can also copy a file (or multiple files) from the (remote) server to your own computer. Let&#8217;s have a look at an example of that:</p>
<blockquote><p>[rechosen@localhost ~]$ scp yourusername@yourserver:/home/yourusername/examplefile .</p></blockquote>
<p><em>Note: The dot at the end means the current local directory. This is a handy trick that can be used about everywhere in Linux. Besides a single dot, you can also type a double dot ( .. ), which is the parent directory of the current directory.</em></p>
<p>This will copy the file &#8220;/home/yourusername/examplefile&#8221; to the current directory on your own computer, provided that the username and password are correct and that the file actually exists.</p>
<p>You probably already guessed that the following command copies a file from a (remote) server to another (remote) server:</p>
<blockquote><p>[rechosen@localhost ~]$ scp yourusername@yourserver:/home/yourusername/examplefile yourusername2@yourserver2:/home/yourusername2/</p></blockquote>
<p>Please note that, to make the above command work, the servers <em>must</em> be able to reach each other, as the data will be transferred directly between them. If the servers somehow can&#8217;t reach each other (for example, if port 22 is not open on one of the sides) you won&#8217;t be able to copy anything. In that case, copy the files to your own computer first, then to the other host. Or make the servers able to reach each other (for example by opening the port).</p>
<p>Well, those are the main uses of scp. We&#8217;ll now go a bit more in-depth about the differences between ssh and scp.</p>
<p>*: <em>Actually you can also use it just like the normal cp command, withhout any ssh connections in it, but that&#8217;s quite useless. It requires you to type an extra &#8216;s&#8217; =).</em></p>
<p><strong>Specifying a port with scp</strong></p>
<p>The scp command acts a little different when it comes to ports. You&#8217;d expect that specifying a port should be done this way:</p>
<blockquote><p>[rechosen@localhost ~]$ scp -p yourport yourusername@yourserver:/home/yourusername/examplefile .</p></blockquote>
<p>However, that will not work. You will get an error message like this one:</p>
<blockquote><p>cp: cannot stat `yourport&#8217;: No such file or directory</p></blockquote>
<p>This is caused by the different architecture of scp. It aims to resemble cp, and cp also features the -p option. However, in cp terms it means &#8216;preserve&#8217;, and it causes the cp command to preserve things like ownership, permissions and creation dates. The scp command can also preserve things like that, and the -p option enables this feature. The port specification should be done with the -P option. Therefore, the following command will work:</p>
<blockquote><p>[rechosen@localhost ~]$ scp -P yourport yourusername@yourserver:/home/yourusername/examplefile .</p></blockquote>
<p>Also note that the -P option <em>must</em> be in front of the (remote) server. The ssh command will still work if you put -p yourport behind the host syntax, but scp won&#8217;t. Why? Because scp also supports copying between two servers and therefore needs to know <em>which</em> server the -P option applies to.</p>
<p><strong>Another difference between scp and ssh</strong></p>
<p>Unlike ssh, scp cannot be used to run a command on a (remote) server, as it already uses that feature of ssh to start the scp server on the host. The scp command does have an option that accepts a program (the -S option), but this program will then be used instead of ssh to establish the encrypted connection, and it will not be executed on the remote host.</p>
<p><strong>Tips &amp; Tricks with ssh and scp</strong></p>
<p>Quite a handy thing about scp is that it supports asterisks. You can copy all files in a remote directory in a way like this:</p>
<blockquote><p>[rechosen@localhost ~]$ scp yourusername@yourserver:/home/yourusername/* .</p></blockquote>
<p>And you can also just copy a whole directory by specifying the -r (recursive) option:</p>
<blockquote><p>[rechosen@localhost ~]$ scp -r yourusername@yourserver:/home/yourusername/ .</p></blockquote>
<p>Both of these also work when copying to a (remote) server or copying between a (remote) server and another (remote) server.</p>
<p>The ssh command can come in handy if you don&#8217;t know the exact location of the file you want to copy with scp. First, ssh to the (remote) server:</p>
<blockquote><p>[rechosen@localhost ~]$ ssh yourusername@yourserver</p></blockquote>
<p>Then browse to the right directory with cd. This is essential Linux terminal knowledge, so I won&#8217;t explain it here. When you&#8217;re in the right directory, you can get the full path with this command:</p>
<blockquote><p>[rechosen@localhost ~]$ pwd</p></blockquote>
<p><em>Note: pwd is an abbreviation of Print Working Directory, which is a useful way to remember the command.</em></p>
<p>You can then copy this output, leave the ssh shell by pressing Ctrl + D, and then paste the full directory path in your scp command. This saves a lot of remembering and typing!</p>
<p>You can also limit the bandwidth scp may use when copying. This is very useful if you&#8217;re wanting to copy a huge amount of data without suffering from slow internet for a long time. Limiting bandwidth is done this way:</p>
<blockquote><p>scp -l bandwidthlimit yourusername@yourserver:/home/yourusername/* .</p></blockquote>
<p>The bandwidth is specified in Kbit/sec. What does this mean? Eight bits is one byte. If you want to copy no faster than 10 Kbyte/sec, set the limit to 80. If you want to copy no faster than 80 Kbyte/sec, set the limit to 640. Get it? You should set the limit to eight times the maximum Kbyte/sec you want it to be. I&#8217;d recommend to set the -l option with all scp&#8217;ing you do on a connection that other people need to use, too. A big amount of copying can virtually block a whole 10 Mbit network if you&#8217;re using hubs.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zye.me/2009/08/53924.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Server 安装图形界面</title>
		<link>http://blog.zye.me/2009/06/52550.html</link>
		<comments>http://blog.zye.me/2009/06/52550.html#comments</comments>
		<pubDate>Sat, 13 Jun 2009 00:15:30 +0000</pubDate>
		<dc:creator>yezheng</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[图形界面]]></category>

		<guid isPermaLink="false">http://blog.so8848.com/?p=52550</guid>
		<description><![CDATA[Ubuntu Server 安装图形界面 1、安装 X 窗口系统：sudo apt-get install x-window-system-core 2、安装登录管理器：sudo apt-get install xdm/gdm/kdm[注]。最常见的图形化登录管理器包括 XDM、GDM、KDM，用户可根据自己的需要选择其中之一 3、 安装桌面环境或窗口管理器：sudo apt-get install ubuntu-desktop/kubuntu-desktop/xubuntu-desktop。这将分别安装 GNOME、KDE、XFCE 桌面环境。对于 GNOME、KDE、XFCE 这些桌面环境来说，为了获得更强的定制效果，也可仅安装最基本的组件，如：sudo apt-get install gnome-core/kde-core/xfce4。 如果不需要桌面环境，也可选择安装窗口管理器代替。那样的话，可以执行指令 sudo apt-get install fluxbox/icewm/enlightenment/fvwm]]></description>
			<content:encoded><![CDATA[<h4 id="subjcns!2FC6D3091545F119!174" class="beTitle">Ubuntu Server 安装图形界面</h4>
<p>1、安装 X 窗口系统：sudo apt-get install x-window-system-core</p>
<p>2、安装登录管理器：sudo apt-get install xdm/gdm/kdm[<a href="http://linuxtoy.org/archives/minimalist-install-of-ubuntu.html#comment" target="_blank">注</a>]。最常见的图形化登录管理器包括 XDM、GDM、KDM，用户可根据自己的需要选择其中之一</p>
<p>3、 安装桌面环境或窗口管理器：sudo apt-get install ubuntu-desktop/kubuntu-desktop/xubuntu-desktop。这将分别安装 GNOME、KDE、XFCE 桌面环境。对于 GNOME、KDE、XFCE 这些桌面环境来说，为了获得更强的定制效果，也可仅安装最基本的组件，如：sudo apt-get install gnome-core/kde-core/xfce4。</p>
<p>如果不需要桌面环境，也可选择安装窗口管理器代替。那样的话，可以执行指令 sudo apt-get install fluxbox/icewm/enlightenment/fvwm</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zye.me/2009/06/52550.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux下如何安装软件</title>
		<link>http://blog.zye.me/2009/04/51294.html</link>
		<comments>http://blog.zye.me/2009/04/51294.html#comments</comments>
		<pubDate>Wed, 22 Apr 2009 00:13:57 +0000</pubDate>
		<dc:creator>yezheng</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[安装软件]]></category>

		<guid isPermaLink="false">http://blog.so8848.com/?p=51294</guid>
		<description><![CDATA[在Windows下安装软件时，只需用鼠标双击软件的安装程序，或者用Zip等解压缩软件解压缩即可安装。在Linux下安装软件对初学者来说，难度高于Windows下软件安装。下面我就详细讲解Linux下如何安装软件。 　 　先来看看Linux软件扩展名。软件后缀为.rpm最初是Red Hat Linux提供的一种包封装格式，现在许多Linux发行版本都使用；后缀为.deb是Debain Linux提供的一种包封装格式；后缀为.tar.gz、tar.Z、tar.bz2或.tgz是使用Unix系统打包工具tar打包的；后缀为.bin 的一般是一些商业软件。通过扩展名可以了解软件格式，进而了解软件安装。 　　RPM格式软件包的安装 1.简介 　　几乎所有的Linux发行版本都使用某种形式的软件包管理安装、更新和卸载软件。与直接从源代码安装相比，软件包管理易于安装和卸载；易于更新已安装的软件包；易于保护配置文件；易于跟踪已安装文件。 　　RPM全称是Red Hat Package Manager（Red Hat包管理器）。RPM本质上就是一个包，包含可以立即在特定机器体系结构上安装和运行的Linux软件。RPM示意图见图1。 　　大多数Linux RPM软件包的命名有一定的规律，它遵循名称-版本-修正版-类型－MYsoftware-1.2 -1.i386.rpm 。 2.安装RPM包软件 　　＃　rpm -ivh MYsoftware-1.2 -1.i386.rpm 　　RPM命令主要参数： 　　-i 安装软件。 　　-t 测试安装，不是真的安装。 　　-p 显示安装进度。 　　-f 忽略任何错误。 　　-U 升级安装。 　　-v 检测套件是否正确安装。 　　这些参数可以同时采用。更多的内容可以参考RPM的命令帮助。 安装QQ 有时候会出问题，试试下面命令： rpm -ivh &#8211;force &#8211;nodeps linuxqq-v1.0.2-beta1.i386.rpm 3.卸载软件 　　＃　rpm -e 软件名 　　需要说明的是，上面代码中使用的是软件名，而不是软件包名。例如，要卸载software-1.2.-1.i386.rpm这个包时，应执行： 　　＃rpm -e software 　　4.强行卸载RPM包 　　有时除去一个RPM是不行的，尤其是系统上有别的程序依赖于它的时候。如果执行命令会显示如下错误信息： <a href='http://blog.zye.me/2009/04/51294.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>在Windows下安装软件时，只需用鼠标双击软件的安装程序，或者用Zip等解压缩软件解压缩即可安装。在Linux下安装软件对初学者来说，难度高于Windows下软件安装。下面我就详细讲解Linux下如何安装软件。</p>
<p>　 　先来看看Linux软件扩展名。软件后缀为.rpm最初是Red Hat Linux提供的一种包封装格式，现在许多Linux发行版本都使用；后缀为.deb是Debain Linux提供的一种包封装格式；后缀为.tar.gz、tar.Z、tar.bz2或.tgz是使用Unix系统打包工具tar打包的；后缀为.bin 的一般是一些商业软件。通过扩展名可以了解软件格式，进而了解软件安装。</p>
<p>　　RPM格式软件包的安装</p>
<h1>1.简介</h1>
<p>　　几乎所有的Linux发行版本都使用某种形式的软件包管理安装、更新和卸载软件。与直接从源代码安装相比，软件包管理易于安装和卸载；易于更新已安装的软件包；易于保护配置文件；易于跟踪已安装文件。</p>
<p>　　RPM全称是Red Hat Package Manager（Red Hat包管理器）。RPM本质上就是一个包，包含可以立即在特定机器体系结构上安装和运行的Linux软件。RPM示意图见图1。</p>
<p><img src="http://www.pconline.com.cn/pcjob/system/linux/others/0507/pic/fgrkds.jpg" border="0" alt="user posted image" /></p>
<p>　　大多数Linux RPM软件包的命名有一定的规律，它遵循名称-版本-修正版-类型－MYsoftware-1.2 -1.i386.rpm 。</p>
<h1>2.安装RPM包软件</h1>
<p>　　＃　rpm -ivh MYsoftware-1.2 -1.i386.rpm</p>
<p>　　RPM命令主要参数：</p>
<p>　　-i 安装软件。<br />
　　-t 测试安装，不是真的安装。<br />
　　-p 显示安装进度。<br />
　　-f 忽略任何错误。<br />
　　-U 升级安装。<br />
　　-v 检测套件是否正确安装。</p>
<p>　　这些参数可以同时采用。更多的内容可以参考RPM的命令帮助。</p>
<p>安装QQ 有时候会出问题，试试下面命令：</p>
<p>rpm -ivh &#8211;force &#8211;nodeps linuxqq-v1.0.2-beta1.i386.rpm</p>
<h1>3.卸载软件</h1>
<p>　　＃　rpm -e 软件名</p>
<p>　　需要说明的是，上面代码中使用的是软件名，而不是软件包名。例如，要卸载software-1.2.-1.i386.rpm这个包时，应执行：<br />
　　＃rpm -e software</p>
<p>　　4.强行卸载RPM包<br />
　　有时除去一个RPM是不行的，尤其是系统上有别的程序依赖于它的时候。如果执行命令会显示如下错误信息：</p>
<p>　　＃# rpm -e xsnow<br />
　　error: removing these packages would break dependencies:<br />
　　/usr/X11R6/bin/xsnow is needed by x-amusements-1.0-1</p>
<p>　　在这种情况下，可以用&#8211;force选项重新安装xsnow：</p>
<p>　　＃# rpm -ivh &#8211;force xsnow-1.41-1.i386.rpm<br />
　　xsnow</p>
<p>　　这里推荐使用工具软件Kleandisk，用它可以安全彻底清理掉不再使用的RPM包。</p>
<h1>5.安装.src.rpm类型的文件</h1>
<p>　　目前RPM有两种模式，一种是已经过编码的（i386.rpm），一种是未经编码的（src.rpm）。<br />
　　rpm &#8211;rebuild Filename.src.rpm</p>
<p>　　这时系统会建立一个文件Filenamr.rpm，在/usr/src/redflag/RPMS/子目录下，一般是i386，具体情况和Linux发行版本有关。然后执行下面代码即可：<br />
　　rpm -ivh /usr/src/regflag/RPMS/i386/Filename.rpm</p>
<h1>使用deb打包的软件安装</h1>
<p>　 　deb是Debian Linux提供的一个包管理器，它与RPM十分类似。但由于RPM出现得早，并且应用广泛，所以在各种版本的Linux中都常见到，而Debian的包管 理器dpkg只出现在Debina Linux中。它的优点是不用被严格的依赖性检查所困扰，缺点是只在Debian Linux发行版中才能见到这个包管理工具。</p>
<p>　　1. 安装<br />
　　＃　dpkg -i MYsoftware-1.2.-1.deb</p>
<p>　　2. 卸载<br />
　　＃　dpkg -e MYsoftware</p>
<p>　　使用源代码进行软件安装</p>
<p>　 　和RPM安装方式相比，使用源代码进行软件安装会复杂一些，但是用源代码安装软件是Linux下进行软件安装的重要手段，也是运行Linux的最主要的 优势之一。使用源代码安装软件，能按照用户的需要选择定制的安装方式进行安装，而不是仅仅依靠那些在安装包中的预配置的参数选择安装。另外，仍然有一些软 件程序只能从源代码处进行安装。</p>
<p>　　现在有很多地方都提供源代码包，到底在什么地方获得取决于软件的特殊需要。对于那些使用比较普遍的软 件，如Sendmail，可以从商业网站处下载源代码软件包（如http://www.sendmail.org ）。一般的软件包，可从开发者的Web站点下载。下面介绍一下安装步骤：</p>
<p>　　1.解压数据包<br />
　　源代码软件通常以.tar.gz做为扩展名,也有tar.Z、tar.bz2或.tgz为扩展名的。不同扩展名解压缩命令也不相同，见表1。<br />
<img src="http://www.pconline.com.cn/pcjob/system/linux/others/0507/pic/fgrkds2.jpg" border="0" alt="user posted image" /><br />
　　<br />
　　2.编译软件<br />
　 　成功解压缩源代码文件后，进入解包的目录。在安装前阅读Readme文件和Install文件。尽管许多源代码文件包都使用基本相同的命令，但是有时在 阅读这些文件时能发现一些重要的区别。例如，有些软件包含一个可以安装的安装脚本程序（.sh）。在安装前阅读这些说明文件，有助于安装成功和节约时间。</p>
<p>　　在安装软件以前要成为root用户。实现这一点通常有两种方式：在另一台终端以root用户登录，或者输入“su”，此时系统会提示输入root用户的密码。输入密码以后，就将一直拥有root用户的权限。如果已经是root用户，那就可以进行下一步。</p>
<p>通常的安装方法是从安装包的目录执行以下命令：</p>
<p>　　gunzip soft1.tar.gz<br />
　　cd soft1<br />
　　＃. /configure ＃配置＃<br />
　　make ＃调用make＃<br />
　　make install ＃安装源代码＃</p>
<p>　　删除安装时产生的临时文件：<br />
　　＃make clean</p>
<p>　　卸载软件：<br />
　　＃make uninstall</p>
<p>　　有些软件包的源代码编译安装后可以用make uninstall命令卸载。如果不提供此功能，则软件的卸载必须手动删除。由于软件可能将文件分散地安装在系统的多个目录中，往往很难把它删除干净，应该在编译前进行配置。</p>
<h1>.bin文件安装</h1>
<p>　 　扩展名为.bin文件是二进制的，它也是源程序经编译后得到的机器语言。有一些软件可以发布为以.bin为后缀的安装包，例如，流媒体播放器 RealONE。如果安装过RealONE的Windows版的话，那么安装RealONE for Linux版本(文件名：r1p1_linux22_libc6_i386_a1.bin)就非常简单了：<br />
　　＃chmod +x r1p1_linux22_libc6_i386_a1.bin<br />
　　./ r1p1_linux22_libc6_i386_a1.bin</p>
<p>　　接下来选择安装方式，有普通安装和高级安装两种。如果不想改动安装目录，就可选择普通安装，整个安装过程几乎和在Windwos下一样。</p>
<p>　　.bin文件的卸载，以RealONE for Linux为例，如果采用普通安装方式的话，在用户主目录下会有Real和Realplayer9两个文件夹，把它们删除即可。</p>
<h1>Linux绿色软件</h1>
<p>　 　Linux也有一些绿色软件，不过不是很多。Linux系统提供一种机制：自动响应软件运行进程的要求,为它设定好可以马上运行的环境。这种机制可以是 一种接口，或者是中间件。程序员编写的程序可以直接拷贝分发，不用安装，只要点击程序的图标，访问操作系统提供的接口，设定好就可以工作。若要删除软件， 直接删除就可以,不用链接文件。这是最简单的软件安装、卸载方式。</p>
<p>　　上面介绍了Linux软件安装的方法，对于Linux初学者来说，RPM安装是一个不错的选择。如果想真正掌握Linux系统，源代码安装仍然是Linux下软件安装的重要手段。</p>
<p>　在Windows下安装软件时，只需用鼠标双击软件的安装程序，或者用Zip等解压缩软件解压缩即可安装。在Linux下安装软件对初学者来说，难度高于Windows下软件安装。下面我就详细讲解Linux下如何安装软件。</p>
<p>　 　先来看看Linux软件扩展名。软件后缀为.rpm最初是Red Hat Linux提供的一种包封装格式，现在许多Linux发行版本都使用；后缀为.deb是Debain Linux提供的一种包封装格式；后缀为.tar.gz、tar.Z、tar.bz2或.tgz是使用Unix系统打包工具tar打包的；后缀为.bin 的一般是一些商业软件。通过扩展名可以了解软件格式，进而了解软件安装。</p>
<p>　　RPM格式软件包的安装</p>
<p>　　1.简介<br />
　　几乎所有的Linux发行版本都使用某种形式的软件包管理安装、更新和卸载软件。与直接从源代码安装相比，软件包管理易于安装和卸载；易于更新已安装的软件包；易于保护配置文件；易于跟踪已安装文件。</p>
<p>　　RPM全称是Red Hat Package Manager（Red Hat包管理器）。RPM本质上就是一个包，包含可以立即在特定机器体系结构上安装和运行的Linux软件。RPM示意图见图1。</p>
<p><img src="http://www.pconline.com.cn/pcjob/system/linux/others/0507/pic/fgrkds.jpg" border="0" alt="user posted image" /></p>
<p>　　大多数Linux RPM软件包的命名有一定的规律，它遵循名称-版本-修正版-类型－MYsoftware-1.2 -1.i386.rpm 。</p>
<p>　　2.安装RPM包软件<br />
　　＃　rpm -ivh MYsoftware-1.2 -1.i386.rpm</p>
<p>　　RPM命令主要参数：</p>
<p>　　-i 安装软件。<br />
　　-t 测试安装，不是真的安装。<br />
　　-p 显示安装进度。<br />
　　-f 忽略任何错误。<br />
　　-U 升级安装。<br />
　　-v 检测套件是否正确安装。</p>
<p>　　这些参数可以同时采用。更多的内容可以参考RPM的命令帮助。</p>
<p>　　3.卸载软件<br />
　　＃　rpm -e 软件名</p>
<p>　　需要说明的是，上面代码中使用的是软件名，而不是软件包名。例如，要卸载software-1.2.-1.i386.rpm这个包时，应执行：<br />
　　＃rpm -e software</p>
<p>　　4.强行卸载RPM包<br />
　　有时除去一个RPM是不行的，尤其是系统上有别的程序依赖于它的时候。如果执行命令会显示如下错误信息：</p>
<p>　　＃# rpm -e xsnow<br />
　　error: removing these packages would break dependencies:<br />
　　/usr/X11R6/bin/xsnow is needed by x-amusements-1.0-1</p>
<p>　　在这种情况下，可以用&#8211;force选项重新安装xsnow：</p>
<p>　　＃# rpm -ivh &#8211;force xsnow-1.41-1.i386.rpm<br />
　　xsnow</p>
<p>　　这里推荐使用工具软件Kleandisk，用它可以安全彻底清理掉不再使用的RPM包。</p>
<p>　　5.安装.src.rpm类型的文件<br />
　　目前RPM有两种模式，一种是已经过编码的（i386.rpm），一种是未经编码的（src.rpm）。<br />
　　rpm &#8211;rebuild Filename.src.rpm</p>
<p>　　这时系统会建立一个文件Filenamr.rpm，在/usr/src/redflag/RPMS/子目录下，一般是i386，具体情况和Linux发行版本有关。然后执行下面代码即可：<br />
　　rpm -ivh /usr/src/regflag/RPMS/i386/Filename.rpm</p>
<p>　　使用deb打包的软件安装</p>
<p>　 　deb是Debian Linux提供的一个包管理器，它与RPM十分类似。但由于RPM出现得早，并且应用广泛，所以在各种版本的Linux中都常见到，而Debian的包管 理器dpkg只出现在Debina Linux中。它的优点是不用被严格的依赖性检查所困扰，缺点是只在Debian Linux发行版中才能见到这个包管理工具。</p>
<p>　　1. 安装<br />
　　＃　dpkg -i MYsoftware-1.2.-1.deb</p>
<p>　　2. 卸载<br />
　　＃　dpkg -e MYsoftware</p>
<p>　　使用源代码进行软件安装</p>
<p>　 　和RPM安装方式相比，使用源代码进行软件安装会复杂一些，但是用源代码安装软件是Linux下进行软件安装的重要手段，也是运行Linux的最主要的 优势之一。使用源代码安装软件，能按照用户的需要选择定制的安装方式进行安装，而不是仅仅依靠那些在安装包中的预配置的参数选择安装。另外，仍然有一些软 件程序只能从源代码处进行安装。</p>
<p>　　现在有很多地方都提供源代码包，到底在什么地方获得取决于软件的特殊需要。对于那些使用比较普遍的软 件，如Sendmail，可以从商业网站处下载源代码软件包（如http://www.sendmail.org ）。一般的软件包，可从开发者的Web站点下载。下面介绍一下安装步骤：</p>
<p>　　1.解压数据包<br />
　　源代码软件通常以.tar.gz做为扩展名,也有tar.Z、tar.bz2或.tgz为扩展名的。不同扩展名解压缩命令也不相同，见表1。<br />
<img src="http://www.pconline.com.cn/pcjob/system/linux/others/0507/pic/fgrkds2.jpg" border="0" alt="user posted image" /><br />
　　<br />
　　2.编译软件<br />
　 　成功解压缩源代码文件后，进入解包的目录。在安装前阅读Readme文件和Install文件。尽管许多源代码文件包都使用基本相同的命令，但是有时在 阅读这些文件时能发现一些重要的区别。例如，有些软件包含一个可以安装的安装脚本程序（.sh）。在安装前阅读这些说明文件，有助于安装成功和节约时间。</p>
<p>　　在安装软件以前要成为root用户。实现这一点通常有两种方式：在另一台终端以root用户登录，或者输入“su”，此时系统会提示输入root用户的密码。输入密码以后，就将一直拥有root用户的权限。如果已经是root用户，那就可以进行下一步。</p>
<p>通常的安装方法是从安装包的目录执行以下命令：</p>
<p>　　gunzip soft1.tar.gz<br />
　　cd soft1<br />
　　＃. /configure ＃配置＃<br />
　　make ＃调用make＃<br />
　　make install ＃安装源代码＃</p>
<p>　　删除安装时产生的临时文件：<br />
　　＃make clean</p>
<p>　　卸载软件：<br />
　　＃make uninstall</p>
<p>　　有些软件包的源代码编译安装后可以用make uninstall命令卸载。如果不提供此功能，则软件的卸载必须手动删除。由于软件可能将文件分散地安装在系统的多个目录中，往往很难把它删除干净，应该在编译前进行配置。</p>
<h1>　　.bin文件安装</h1>
<p>　 　扩展名为.bin文件是二进制的，它也是源程序经编译后得到的机器语言。有一些软件可以发布为以.bin为后缀的安装包，例如，流媒体播放器 RealONE。如果安装过RealONE的Windows版的话，那么安装RealONE for Linux版本(文件名：r1p1_linux22_libc6_i386_a1.bin)就非常简单了：<br />
　　＃chmod +x r1p1_linux22_libc6_i386_a1.bin<br />
　　./ r1p1_linux22_libc6_i386_a1.bin</p>
<p>　　接下来选择安装方式，有普通安装和高级安装两种。如果不想改动安装目录，就可选择普通安装，整个安装过程几乎和在Windwos下一样。</p>
<p>　　.bin文件的卸载，以RealONE for Linux为例，如果采用普通安装方式的话，在用户主目录下会有Real和Realplayer9两个文件夹，把它们删除即可。</p>
<p><strong>　　Linux绿色软件</strong></p>
<p>　 　Linux也有一些绿色软件，不过不是很多。Linux系统提供一种机制：自动响应软件运行进程的要求,为它设定好可以马上运行的环境。这种机制可以是 一种接口，或者是中间件。程序员编写的程序可以直接拷贝分发，不用安装，只要点击程序的图标，访问操作系统提供的接口，设定好就可以工作。若要删除软件， 直接删除就可以,不用链接文件。这是最简单的软件安装、卸载方式。</p>
<p>　　上面介绍了Linux软件安装的方法，对于Linux初学者来说，RPM安装是一个不错的选择。如果想真正掌握Linux系统，源代码安装仍然是Linux下软件安装的重要手段。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zye.me/2009/04/51294.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu linux下如何访问 网络共享</title>
		<link>http://blog.zye.me/2009/04/51293.html</link>
		<comments>http://blog.zye.me/2009/04/51293.html#comments</comments>
		<pubDate>Wed, 22 Apr 2009 00:01:38 +0000</pubDate>
		<dc:creator>yezheng</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[网络共享]]></category>

		<guid isPermaLink="false">http://blog.so8848.com/?p=51293</guid>
		<description><![CDATA[挂接Windows文件共享 　　Windows网络共享的核心是SMB/CIFS，在linux下要挂接(mount)windows的磁盘共享，就必须安装和使用samba软件包。现在流行的linux发行版绝大多数已经包含了samba软件包，如果安装linux系统时未安装samba请首先安装samba。当然也可以到www.samba.org网站下载&#8230;&#8230;新的版本是3.0.10版。 ubuntu 下可以直接输入命令安装: sudo apt-get install samba 　　当windows系统共享设置好以后，就可以在linux客户端挂接(mount)了，具体操作如下： 　　# mkdir –p /mnt/samba 　　注：建立一个目录用来作挂接点(mount point) 　　# mount -t smbfs -o username=administrator,password=pldy123 //10.140.133.23/c$ /mnt/samba 如果不行,删除参数 -t smbfs试试(注意空格) mount -o username=administrator,password=pldy123 //10.140.133.23/c$ /mnt/samba 　　注：administrator 和 pldy123 是ip地址为10.140.133.23 windows计算机的一个用户名和密码，c$是这台计算机的一个磁盘共享或者文件夹名 　　如此就可以在linux系统上通过/mnt/samba来访问windows系统磁盘上的文件了。以上操作在redhat as server 3、redflag server 4.1、suse server 9以及windows NT 4.0、windows 2000、windows xp、windows 2003环境下测试通过。 U盘mount mkdir /mnt/usb 然后我们就可以接上我的U盘了，然后在终端下输入命令并击Enter键即可： mount /dev/sda1 <a href='http://blog.zye.me/2009/04/51293.html'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: 10.5pt; line-height: 150%;"><strong><span style="font-family: 宋体;">挂接</span></strong></span><strong><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">Windows</span></strong><strong><span style="font-size: 10.5pt; line-height: 150%; font-family: 宋体;">文件共享</span></strong></p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%;">　　</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">Windows</span><span style="font-size: 10.5pt; line-height: 150%;">网络共享的核心是</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">SMB/CIFS</span><span style="font-size: 10.5pt; line-height: 150%;">，在</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">linux</span><span style="font-size: 10.5pt; line-height: 150%;">下要挂接</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">(mount)windows</span><span style="font-size: 10.5pt; line-height: 150%;">的磁盘共享，就必须安装和使用</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">samba</span><span style="font-size: 10.5pt; line-height: 150%;">软件包。现在流行的</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">linux</span><span style="font-size: 10.5pt; line-height: 150%;">发行版绝大多数已经包含了</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">samba</span><span style="font-size: 10.5pt; line-height: 150%;">软件包，如果安装</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">linux</span><span style="font-size: 10.5pt; line-height: 150%;">系统时未安装</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">samba</span><span style="font-size: 10.5pt; line-height: 150%;">请首先安装</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">samba</span><span style="font-size: 10.5pt; line-height: 150%;">。当然也可以到</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;"><span style="color: #0000ff;"><span>www.samba.org<span>网站下载</span>&#8230;&#8230;<span>新的版本是</span>3.0.10<span>版。</span></span></span></span></p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;"><span style="color: #0000ff;"><span><span> <strong>ubuntu 下可以直接输入命令安装: </strong>sudo apt-get install samba<br />
</span></span></span></span>
</p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%;">　　当</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">windows</span><span style="font-size: 10.5pt; line-height: 150%;">系统共享设置好以后，就可以在</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">linux</span><span style="font-size: 10.5pt; line-height: 150%;">客户端挂接</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">(mount)</span><span style="font-size: 10.5pt; line-height: 150%;">了，具体操作如下：</span></p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%;">　　</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;"># mkdir –p /mnt/samba </span></p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%;">　　注：建立一个目录用来作挂接点</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">(mount point)</span></p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%;">　　</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;"># mount -t smbfs -o username=administrator,password=pldy123 //10.140.133.23/c$ /mnt/samba</span></p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;"> <strong> 如果不行,删除参数 </strong></span><strong><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">-t smbfs试试(注意空格)</span></strong></p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">mount -o username=administrator,password=pldy123 //10.140.133.23/c$ /mnt/samba</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;"> </span></p>
<p style="line-height: 150%;"><span style="font-size: 10.5pt; line-height: 150%;">　　注：</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">administrator </span><span style="font-size: 10.5pt; line-height: 150%;">和</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;"> <span>pldy123 </span></span><span style="font-size: 10.5pt; line-height: 150%;">是</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">ip</span><span style="font-size: 10.5pt; line-height: 150%;">地址为</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">10.140.133.23 windows</span><span style="font-size: 10.5pt; line-height: 150%;">计算机的一个用户名和密码，</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">c$</span><span style="font-size: 10.5pt; line-height: 150%;">是这台计算机的一个磁盘共享或者文件夹名</span></p>
<p><span style="font-size: 10.5pt; line-height: 150%;">　　如此就可以在</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">linux</span><span style="font-size: 10.5pt; line-height: 150%;">系统上通过</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">/mnt/samba</span><span style="font-size: 10.5pt; line-height: 150%;">来访问</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">windows</span><span style="font-size: 10.5pt; line-height: 150%;">系统磁盘上的文件了。以上操作在</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">redhat as server 3</span><span style="font-size: 10.5pt; line-height: 150%;">、</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">redflag server 4.1</span><span style="font-size: 10.5pt; line-height: 150%;">、</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">suse server 9</span><span style="font-size: 10.5pt; line-height: 150%;">以及</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">windows NT 4.0</span><span style="font-size: 10.5pt; line-height: 150%;">、</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">windows 2000</span><span style="font-size: 10.5pt; line-height: 150%;">、</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">windows xp</span><span style="font-size: 10.5pt; line-height: 150%;">、</span><span style="font-size: 10.5pt; line-height: 150%; font-family: ˎ̥_GB2312;">windows 2003</span><span style="font-size: 10.5pt; line-height: 150%;">环境下测试通过。</span></p>
<h1><span style="font-size: 10.5pt; line-height: 150%;">U盘mount</span></h1>
<p style="text-indent: 2em;">mkdir /mnt/usb</p>
<p style="text-indent: 2em;">
<p style="text-indent: 2em;">然后我们就可以接上我的U盘了，然后在终端下输入命令并击Enter键即可：</p>
<p style="text-indent: 2em;">
<p style="text-indent: 2em; text-align: left;">mount /dev/sda1 /mnt/us</p>
<h1 style="text-indent: 2em; text-align: left;">umount</h1>
<h1><span style="line-height: 150%; table-layout: fixed; width: 100%;"> </span></h1>
<p style="text-indent: 2em;">在Windows下当我们用完U盘后，在我们取下U盘前我们先要删除，同样在Linux下我们也要删除挂起点，方法是：</p>
<p style="text-indent: 2em;">
<p style="text-indent: 2em;">umount /dev/sda1 /mnt/usb 或 umount /dev/sda1</p>
<p style="text-indent: 2em;">
<p style="text-indent: 2em;">如果不把U盘给umount掉，那样很容易造成数据的丢失。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zye.me/2009/04/51293.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

