<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
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/"
> <channel><title>Comments on: Tip: How to sort folders by size with one command line in Linux</title> <atom:link href="http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/feed/" rel="self" type="application/rss+xml" /><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/</link> <description>The Journal Of A Linux Sysadmin</description> <lastBuildDate>Thu, 09 Feb 2012 03:50:59 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Tip: How to sort folders by size with one command line in Linux &#171; Arian&#039;s Blog</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-193880</link> <dc:creator>Tip: How to sort folders by size with one command line in Linux &#171; Arian&#039;s Blog</dc:creator> <pubDate>Mon, 23 Jan 2012 19:24:54 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-193880</guid> <description>[...] From: http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/ [...]</description> <content:encoded><![CDATA[<p>[...] From: http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/ [...]</p> ]]></content:encoded> </item> <item><title>By: Edo</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-193665</link> <dc:creator>Edo</dc:creator> <pubDate>Thu, 10 Nov 2011 09:26:53 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-193665</guid> <description>To catch the hidden files?ls -A &#124; while read x; do du -s &quot;$x&quot;; done &#124; sort -nr</description> <content:encoded><![CDATA[<p>To catch the hidden files?</p><p>ls -A | while read x; do du -s &#8220;$x&#8221;; done | sort -nr</p> ]]></content:encoded> </item> <item><title>By: min</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-193525</link> <dc:creator>min</dc:creator> <pubDate>Wed, 21 Sep 2011 01:36:51 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-193525</guid> <description>du -sh /home/user</description> <content:encoded><![CDATA[<p>du -sh /home/user</p> ]]></content:encoded> </item> <item><title>By: samlii</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-192989</link> <dc:creator>samlii</dc:creator> <pubDate>Thu, 16 Jun 2011 15:05:12 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-192989</guid> <description>the summarize has been around forever and is the same as the -s in some of the earlier comments.The human readable sort I don&#039;t know when it was added but it made my life easier for a while now.Obligatory line I use:  du -hs * &#124; sort -hr &#124; head</description> <content:encoded><![CDATA[<p>the summarize has been around forever and is the same as the -s in some of the earlier comments.</p><p>The human readable sort I don&#8217;t know when it was added but it made my life easier for a while now.</p><p>Obligatory line I use:  du -hs * | sort -hr | head</p> ]]></content:encoded> </item> <item><title>By: David Sveningsson</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-192317</link> <dc:creator>David Sveningsson</dc:creator> <pubDate>Fri, 18 Feb 2011 12:27:50 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-192317</guid> <description>&lt;code&gt;du -h --summarize * &#124; sort -h&lt;/code&gt;I do not know when coreutils added --summarize, but it displays the total size for the target. sort also has a -h flag to sort &quot;human readable numbers&quot; e.g. 1.4G.I know this is quite an old post but I think people should learn about the new flags.</description> <content:encoded><![CDATA[<p><code>du -h --summarize * | sort -h</code></p><p>I do not know when coreutils added &#8211;summarize, but it displays the total size for the target. sort also has a -h flag to sort &#8220;human readable numbers&#8221; e.g. 1.4G.</p><p>I know this is quite an old post but I think people should learn about the new flags.</p> ]]></content:encoded> </item> <item><title>By: shreyas</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-192185</link> <dc:creator>shreyas</dc:creator> <pubDate>Mon, 07 Feb 2011 09:22:48 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-192185</guid> <description>du -H --max-depth=1 /home/usersimple n best command to sort size wise. thks for the help</description> <content:encoded><![CDATA[<p>du -H &#8211;max-depth=1 /home/user</p><p>simple n best command to sort size wise. thks for the help</p> ]]></content:encoded> </item> <item><title>By: sdaau</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-181879</link> <dc:creator>sdaau</dc:creator> <pubDate>Fri, 04 Jun 2010 17:49:08 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-181879</guid> <description>Just a rewrite with code tag - pre seems to get sanitized&lt;code&gt;
du -b -x –max-depth=1 / 2&gt;/dev/null &#124; sort -n -r &#124; while read line ; do arr=($line) ; echo $(echo &quot;scale=4; ${arr[0]}/1024&quot; &#124; bc) KB – ${arr[1]} ; done
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Just a rewrite with code tag &#8211; pre seems to get sanitized</p><p><code><br
/> du -b -x –max-depth=1 / 2&gt;/dev/null | sort -n -r | while read line ; do arr=($line) ; echo $(echo "scale=4; ${arr[0]}/1024" | bc) KB – ${arr[1]} ; done<br
/> </code></p> ]]></content:encoded> </item> <item><title>By: sdaau</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-181878</link> <dc:creator>sdaau</dc:creator> <pubDate>Fri, 04 Jun 2010 17:45:38 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-181878</guid> <description>Sorry, seems &lt;b&gt;du&lt;/b&gt; needs &lt;b&gt;-b&lt;/b&gt; to specify sizes in bytes for the above to be correct, so here is another attempt - this time also in pre tags :)du -b -x --max-depth=1 / 2&gt;/dev/null &#124; sort -n -r &#124; while read line ; do arr=($line) ; echo $(echo &quot;scale=4; ${arr[0]}/1024&quot; &#124; bc) KB – ${arr[1]} ; done </description> <content:encoded><![CDATA[<p>Sorry, seems <b>du</b> needs <b>-b</b> to specify sizes in bytes for the above to be correct, so here is another attempt &#8211; this time also in pre tags <img
src='http://www.ducea.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>du -b -x &#8211;max-depth=1 / 2&gt;/dev/null | sort -n -r | while read line ; do arr=($line) ; echo $(echo &#8220;scale=4; ${arr[0]}/1024&#8243; | bc) KB – ${arr[1]} ; done</p> ]]></content:encoded> </item> <item><title>By: sdaau</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-181876</link> <dc:creator>sdaau</dc:creator> <pubDate>Thu, 03 Jun 2010 21:06:49 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-181876</guid> <description>Hi, just wanted to include my version of what I read here - it uses sort on raw bytes, and then uses bc (could be wcalc too) to calculate KB for display:du --max-depth=1 /usr &#124; sort -n -r &#124; while read line ; do arr=($line) ; echo $(echo &quot;scale=4; ${arr[0]}/1024&quot; &#124; bc) KB - ${arr[1]} ;</description> <content:encoded><![CDATA[<p>Hi, just wanted to include my version of what I read here &#8211; it uses sort on raw bytes, and then uses bc (could be wcalc too) to calculate KB for display:</p><p>du &#8211;max-depth=1 /usr | sort -n -r | while read line ; do arr=($line) ; echo $(echo &#8220;scale=4; ${arr[0]}/1024&#8243; | bc) KB &#8211; ${arr[1]} ;</p> ]]></content:encoded> </item> <item><title>By: Dave</title><link>http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/comment-page-2/#comment-181746</link> <dc:creator>Dave</dc:creator> <pubDate>Wed, 14 Apr 2010 23:36:40 +0000</pubDate> <guid
isPermaLink="false">http://www.ducea.com/2006/05/14/tip-how-to-sort-folders-by-size-with-one-command-line-in-linux/#comment-181746</guid> <description>Fab, that&#039;s a joke right?  You gotta be kidding.</description> <content:encoded><![CDATA[<p>Fab, that&#8217;s a joke right?  You gotta be kidding.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Served from: www.ducea.com @ 2012-02-08 19:56:42 by W3 Total Cache -->
