<?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>Piece of Unix Hints &#187; MP3</title>
	<atom:link href="http://hints.jeb.be/tag/mp3/feed/" rel="self" type="application/rss+xml" />
	<link>http://hints.jeb.be</link>
	<description>hints.jeb.be</description>
	<lastBuildDate>Fri, 04 Dec 2009 20:35:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How big is you MP3 collection all over your hard drives ?</title>
		<link>http://hints.jeb.be/2008/12/17/how-big-is-you-mp3-collection-all-over-your-hard-drives/</link>
		<comments>http://hints.jeb.be/2008/12/17/how-big-is-you-mp3-collection-all-over-your-hard-drives/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 01:40:01 +0000</pubDate>
		<dc:creator>Jeb</dc:creator>
				<category><![CDATA[Perl]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[MP3]]></category>

		<guid isPermaLink="false">http://hints.jeb.be/?p=19</guid>
		<description><![CDATA[You want to know the total size of all your .mp3 files ? (or any kind of file, juste change the locate argument) Try : locate .mp3 &#124; perl -e 'while(&#60;STDIN&#62;) { chop ; $tsize += -s $_; } print $tsize/1048576 . "Mo\n"' or locate .mp3 &#124; perl -e 'foreach (&#60;&#62;) { chop and $_["+"]+=-s$_ [...]]]></description>
			<content:encoded><![CDATA[<p>You want to know the total size of all your .mp3 files ? (or any kind of file, juste change the locate argument)</p>
<p>Try :</p>
<pre>locate .mp3 | perl -e 'while(&lt;STDIN&gt;) { chop ; $tsize += -s $_; } print $tsize/1048576 . "Mo\n"'</pre>
<p>or
<pre>
locate .mp3 | perl -e 'foreach (&lt;&gt;) { chop and $_["+"]+=-s$_ } print $_["+"]/1048576 . "Mo\n"'</pre>
<p>or if you didn&#8217;t have perl (sorry for you <img src='http://hints.jeb.be/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> )</p>
<pre>locate .mp3 | awk '{print "\"" $0 "\""}' | xargs ls -l | awk 'BEGIN{s=0}{s+=($5/1024/1024)}END{print s "Mo"}'</pre>
]]></content:encoded>
			<wfw:commentRss>http://hints.jeb.be/2008/12/17/how-big-is-you-mp3-collection-all-over-your-hard-drives/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
