<?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>Ivan's Technical Blog &#187; Linux</title>
	<atom:link href="http://ivan-grace.com/techblog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://ivan-grace.com/techblog</link>
	<description></description>
	<lastBuildDate>Mon, 06 Apr 2009 03:54:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to count inode via ssh</title>
		<link>http://ivan-grace.com/techblog/2008/10/how-to-count-inode/</link>
		<comments>http://ivan-grace.com/techblog/2008/10/how-to-count-inode/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 11:35:50 +0000</pubDate>
		<dc:creator>Ivan Guan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[inode]]></category>

		<guid isPermaLink="false">http://ivan-grace.com/techblog/?p=52</guid>
		<description><![CDATA[If your provider allows you to ssh to your account, then once you are connected, all you have to do is type the following:
find . -printf &#8220;%i\n&#8221; &#124; sort -u &#124; wc -l
For more options you can visit http://www.olivetalks.com
]]></description>
			<content:encoded><![CDATA[<p>If your provider allows you to ssh to your account, then once you are connected, all you have to do is type the following:</p>
<p>find . -printf &#8220;%i\n&#8221; | sort -u | wc -l</p>
<p>For more options you can visit <a href="http://www.olivetalks.com/2008/03/05/inodes-attack-part1/">http://www.olivetalks.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ivan-grace.com/techblog/2008/10/how-to-count-inode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to count files in Linux</title>
		<link>http://ivan-grace.com/techblog/2008/07/how-to-count-files-in-linux/</link>
		<comments>http://ivan-grace.com/techblog/2008/07/how-to-count-files-in-linux/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 15:31:58 +0000</pubDate>
		<dc:creator>Ivan Guan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux tricks]]></category>

		<guid isPermaLink="false">http://ivan-grace.com/techblog/?p=19</guid>
		<description><![CDATA[To determine how many files there are in the current directory, put in
ls -1 &#124; wc -l.
This uses wc to do a count of the number of lines (-l) in the output of ls -1. It doesn&#8217;t count dotfiles, but seems it will count the directory ./
To include subdirectory files, you can use ls -R [...]]]></description>
			<content:encoded><![CDATA[<p>To determine how many files there are in the current directory, put in</p>
<p><strong>ls -1 | wc -l</strong>.</p>
<p>This uses wc to do a count of the number of lines (-l) in the output of ls -1. It doesn&#8217;t count dotfiles, but seems it will count the directory ./</p>
<p>To include subdirectory files, you can use <strong>ls -R | wc -l</strong></p>
<p>To ignore directory ./ you can use <strong>find . -type f | wc -l</strong></p>
<p>If you want to count only files and NOT include symbolic links (just an example of what else you could do), you could use ls -l | grep -v ^l | wc -l (that&#8217;s an &#8220;L&#8221; not a &#8220;1&#8243; this time, we want a &#8220;long&#8221; listing here). grep checks for any line beginning with &#8220;l&#8221; (indicating a link), and discards that line (-v).</p>
]]></content:encoded>
			<wfw:commentRss>http://ivan-grace.com/techblog/2008/07/how-to-count-files-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
