<?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> &#187; linux</title>
	<atom:link href="http://www.liguosong.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liguosong.com</link>
	<description></description>
	<lastBuildDate>Tue, 08 May 2018 01:02:19 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.2</generator>
		<item>
		<title>centos 打开指定端口</title>
		<link>http://www.liguosong.com/2015/11/19/centos-%e6%89%93%e5%bc%80%e6%8c%87%e5%ae%9a%e7%ab%af%e5%8f%a3/</link>
		<comments>http://www.liguosong.com/2015/11/19/centos-%e6%89%93%e5%bc%80%e6%8c%87%e5%ae%9a%e7%ab%af%e5%8f%a3/#comments</comments>
		<pubDate>Thu, 19 Nov 2015 12:58:20 +0000</pubDate>
		<dc:creator>lgs</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.liguosong.com/?p=551</guid>
		<description><![CDATA[比如开启80端口 /sbin/iptables -I INPUT -p tcp --dport 80 -j A [...]]]></description>
				<content:encoded><![CDATA[<p>比如开启80端口</p>
<pre class="brush:bash">/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT</pre>
<p>保存刚才的修改</p>
<pre class="brush:bash">/etc/rc.d/init.d/iptables save</pre>
<p>查看刚才的修改是否生效</p>
<pre class="brush:bash">/etc/init.d/iptables status</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liguosong.com/2015/11/19/centos-%e6%89%93%e5%bc%80%e6%8c%87%e5%ae%9a%e7%ab%af%e5%8f%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux df 查看磁盘使用情况</title>
		<link>http://www.liguosong.com/2014/09/18/linux-df-%e6%9f%a5%e7%9c%8b%e7%a3%81%e7%9b%98%e4%bd%bf%e7%94%a8%e6%83%85%e5%86%b5/</link>
		<comments>http://www.liguosong.com/2014/09/18/linux-df-%e6%9f%a5%e7%9c%8b%e7%a3%81%e7%9b%98%e4%bd%bf%e7%94%a8%e6%83%85%e5%86%b5/#comments</comments>
		<pubDate>Thu, 18 Sep 2014 07:23:30 +0000</pubDate>
		<dc:creator>lgs</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[linux df]]></category>

		<guid isPermaLink="false">http://www.liguosong.com/?p=413</guid>
		<description><![CDATA[df 查看系统磁盘的使用情况 常用参数： -a, --all 显示所有的文件系统 --total 对df结果， [...]]]></description>
				<content:encoded><![CDATA[<p>df 查看系统磁盘的使用情况</p>
<p>常用参数：</p>
<pre class="brush:bash">       -a, --all  
              显示所有的文件系统

       --total
              对df结果，进行汇总，在最下面输出一行每列的总数

       -h, --human-readable
              将结果的数字转换成更加易读的格式。这个参数很好用

       -H, --si
              与-h作用，但是计算使用1000进制，而不是1024

       -i, --inodes
              显示i节点信息，而不是磁盘块

       -k     like --block-size=1K
              将空间的结果，以kb为单位显示

       -l, --local
              只显示本地文件系统

       --no-sync
              忽略 sync 命令

       -P, --portability
              输出格式为POSIX

       --sync
             在取得磁盘信息前，先执行sync命令

       -t, --type=TYPE
              只显示特定类型的文件系统。如只显示ext4的，可以用 df -t ext4 或者 df --type=ext4

       -T, --print-type
              显示文件系统的类型

       -x, --exclude-type=TYPE
              显示不是指定类型的文件系统，与-t使用相反。如想显示不是ext4类型的文件系统，可以用 df -x ext4 或者df --exclude-type=ext4
       --version 查看版本信息
       --help 获取帮助信息</pre>
<p>更多参数使用如下命令查看：</p>
<pre>man df
或者
df --help</pre>
<p><span style="line-height: 1.714285714; font-size: 1rem;">例子：看磁盘占用空间，还剩多少空间。</span></p>
<pre class="brush:other">df -lh</pre>
<p>结果：</p>
<pre class="brush:other">Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       20G  6.8G   13G  36% /
udev            993M  4.0K  993M   1% /dev
tmpfs           201M  284K  200M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none           1002M     0 1002M   0% /run/shm
/dev/xvdb1       40G   33G  4.6G  88% /mnt</pre>
<p>解释：</p>
<p>Filesystem：文件系统<br />
Size：总共大小<br />
Used：使用大小<br />
Avail：可用<br />
Mounted on：挂在分区</p>
<p>如果要查看一个文件系统的信息，可以这样写</p>
<pre class="brush:other">df -h /mnt</pre>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.liguosong.com/2014/09/18/linux-df-%e6%9f%a5%e7%9c%8b%e7%a3%81%e7%9b%98%e4%bd%bf%e7%94%a8%e6%83%85%e5%86%b5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
