<?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: How do I find the largest top 10 files and directories on a Linux / UNIX / BSD filesystem?</title> <atom:link href="http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Thomas</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-65862</link> <dc:creator>Thomas</dc:creator> <pubDate>Wed, 21 Dec 2011 11:19:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-65862</guid> <description>Same here...</description> <content:encoded><![CDATA[<p>Same here&#8230;</p> ]]></content:encoded> </item> <item><title>By: Nalinda</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-65640</link> <dc:creator>Nalinda</dc:creator> <pubDate>Wed, 14 Dec 2011 23:29:06 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-65640</guid> <description>Thanks heaps for this. It saved me lot of time.</description> <content:encoded><![CDATA[<p>Thanks heaps for this. It saved me lot of time.</p> ]]></content:encoded> </item> <item><title>By: Nick</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-65008</link> <dc:creator>Nick</dc:creator> <pubDate>Wed, 30 Nov 2011 13:56:13 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-65008</guid> <description>How about the 3 hours it takes to read through a bunch of unexplained programming nonsense. I swear half of the time all Linux guys do is insult other users....Example, the first listing is great as it begins to explain what the flags do, but I have no idea were to put some of them, pipes are not explained...ect</description> <content:encoded><![CDATA[<p>How about the 3 hours it takes to read through a bunch of unexplained programming nonsense. I swear half of the time all Linux guys do is insult other users&#8230;.Example, the first listing is great as it begins to explain what the flags do, but I have no idea were to put some of them, pipes are not explained&#8230;ect</p> ]]></content:encoded> </item> <item><title>By: aaa</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-63142</link> <dc:creator>aaa</dc:creator> <pubDate>Tue, 04 Oct 2011 14:44:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-63142</guid> <description>ls -lR &#124; sort -nr +4 -5 &#124; head</description> <content:encoded><![CDATA[<p>ls -lR | sort -nr +4 -5 | head</p> ]]></content:encoded> </item> <item><title>By: Jayman</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-62379</link> <dc:creator>Jayman</dc:creator> <pubDate>Mon, 12 Sep 2011 20:31:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-62379</guid> <description>c:\&gt;dir /S /O-S &#124; more
The simple dir /S command from c:\ will give you all files and directories from c:\ all the way through the drive and will sort from largest to smallest running through each directory.  You can filter using /A if you&#039;d like to restrict by hidden, system, archive files, read only files etc. and passing the output to another windows command if you need to further restrict or search in the files for something like &quot;show me all the files on my hard drive over 6MB that contain the word &#039;log&#039; from largest to smallest.&quot;
/O will Specify the sort order for the files with the S after it sorting by file size (smallest first) putting the - in front of the S reverses the order.
&#124; more - you&#039;re a unix dude, you should know what this means...
But if someone is doing some cleanup through their harddrive, this is the simple command I&#039;d start with.
Just a note about the cockyness or us Unix admins (as I happen to be one now)
Not everyone that uses windows started using it with a mouse kid!!!  Also not everyone who prefers windows is not cross-platform...  We were running 64 bit clustered NT boxes on RISC processors at Digital Equipment Corporation with failover and failback in 1996 brother.  Don&#039;t believe me?  Find a really old copy of Windows NT ver 3.51 open it and you&#039;ll see two folders NT and Alpha.
The Department of Veterans Affairs had no problems with ever needing to reboot a &quot;lousy unreliable windows box&quot; because the Intel platform itself was the problem, not windows.  We ran Alpha on 64 bit RISC processors and it was just as reliable as any Unix box or Mainframe we had.  I had a Jensen Alpha running an exchange server for 5 years, and we only rebooted it every 6 months for giggles...
Windows machines are made to be used by the masses which means more dumbasses can kinda run one.  A good Admin is a good Admin, no matter what platform.  Be nice and be helpful or don&#039;t post.</description> <content:encoded><![CDATA[<p>c:\&gt;dir /S /O-S | more</p><p>The simple dir /S command from c:\ will give you all files and directories from c:\ all the way through the drive and will sort from largest to smallest running through each directory.  You can filter using /A if you&#8217;d like to restrict by hidden, system, archive files, read only files etc. and passing the output to another windows command if you need to further restrict or search in the files for something like &#8220;show me all the files on my hard drive over 6MB that contain the word &#8216;log&#8217; from largest to smallest.&#8221;</p><p>/O will Specify the sort order for the files with the S after it sorting by file size (smallest first) putting the &#8211; in front of the S reverses the order.</p><p>| more &#8211; you&#8217;re a unix dude, you should know what this means&#8230;</p><p>But if someone is doing some cleanup through their harddrive, this is the simple command I&#8217;d start with.</p><p>Just a note about the cockyness or us Unix admins (as I happen to be one now)<br
/> Not everyone that uses windows started using it with a mouse kid!!!  Also not everyone who prefers windows is not cross-platform&#8230;  We were running 64 bit clustered NT boxes on RISC processors at Digital Equipment Corporation with failover and failback in 1996 brother.  Don&#8217;t believe me?  Find a really old copy of Windows NT ver 3.51 open it and you&#8217;ll see two folders NT and Alpha.</p><p>The Department of Veterans Affairs had no problems with ever needing to reboot a &#8220;lousy unreliable windows box&#8221; because the Intel platform itself was the problem, not windows.  We ran Alpha on 64 bit RISC processors and it was just as reliable as any Unix box or Mainframe we had.  I had a Jensen Alpha running an exchange server for 5 years, and we only rebooted it every 6 months for giggles&#8230;</p><p>Windows machines are made to be used by the masses which means more dumbasses can kinda run one.  A good Admin is a good Admin, no matter what platform.  Be nice and be helpful or don&#8217;t post.</p> ]]></content:encoded> </item> <item><title>By: Mr-Yellow</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-61001</link> <dc:creator>Mr-Yellow</dc:creator> <pubDate>Tue, 26 Jul 2011 00:54:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-61001</guid> <description>Yeah you just go ahead and wait the 3 hours this search would take on Windows.</description> <content:encoded><![CDATA[<p>Yeah you just go ahead and wait the 3 hours this search would take on Windows.</p> ]]></content:encoded> </item> <item><title>By: Spechal</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-60175</link> <dc:creator>Spechal</dc:creator> <pubDate>Wed, 22 Jun 2011 17:47:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-60175</guid> <description>&quot;find / -type f -size +20000k -exec ls -lh {} ; &#124; awk ‘{ print $8 “: ” $5 }’&quot;
needs to have the exec altered
find / -type f -size +20000k -exec ls -lh {} \; &#124; awk ‘{ print $8 “: ” $5 }’
Also, I find this output easier to read
find . -type f -size +20000k -exec ls -lh {} \; &#124; awk &#039;{print $5&quot;: &quot;$8}&#039;</description> <content:encoded><![CDATA[<p>&#8220;find / -type f -size +20000k -exec ls -lh {} ; | awk ‘{ print $8 “: ” $5 }’&#8221;</p><p>needs to have the exec altered</p><p>find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $8 “: ” $5 }’</p><p>Also, I find this output easier to read</p><p>find . -type f -size +20000k -exec ls -lh {} \; | awk &#8216;{print $5&#8243;: &#8220;$8}&#8217;</p> ]]></content:encoded> </item> <item><title>By: Satish</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-59983</link> <dc:creator>Satish</dc:creator> <pubDate>Mon, 13 Jun 2011 22:22:38 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-59983</guid> <description>I have learnt a lot from your posts
thanks alot and keep it up.</description> <content:encoded><![CDATA[<p>I have learnt a lot from your posts</p><p>thanks alot and keep it up.</p> ]]></content:encoded> </item> <item><title>By: Brian</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-56234</link> <dc:creator>Brian</dc:creator> <pubDate>Thu, 10 Mar 2011 03:00:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-56234</guid> <description>I get a syntax error when coptying and pasting this command</description> <content:encoded><![CDATA[<p>I get a syntax error when coptying and pasting this command</p> ]]></content:encoded> </item> <item><title>By: Rafiq</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-55766</link> <dc:creator>Rafiq</dc:creator> <pubDate>Fri, 18 Feb 2011 20:51:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-55766</guid> <description>I found this one the simplest one.
ls -lSh . &#124; head -5</description> <content:encoded><![CDATA[<p>I found this one the simplest one.<br
/> ls -lSh . | head -5</p> ]]></content:encoded> </item> <item><title>By: Dave</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-54965</link> <dc:creator>Dave</dc:creator> <pubDate>Tue, 18 Jan 2011 17:56:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-54965</guid> <description>This may vary depending on the version of Windows you&#039;re using, but the basic procedure is: open the find/search window, go to the advanced options, and there will be an option there to enter in a size parameter.  Simple.
In XP, press F3 or go Start-&gt;Search.  Choose &quot;All files and folders&quot;, then &quot;More advanced options&quot;, then &quot;What size is it?&quot;, then specify a size.</description> <content:encoded><![CDATA[<p>This may vary depending on the version of Windows you&#8217;re using, but the basic procedure is: open the find/search window, go to the advanced options, and there will be an option there to enter in a size parameter.  Simple.</p><p>In XP, press F3 or go Start-&gt;Search.  Choose &#8220;All files and folders&#8221;, then &#8220;More advanced options&#8221;, then &#8220;What size is it?&#8221;, then specify a size.</p> ]]></content:encoded> </item> <item><title>By: Keith White</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-46780</link> <dc:creator>Keith White</dc:creator> <pubDate>Wed, 07 Apr 2010 10:44:03 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-46780</guid> <description>I find the following works rather well...
&lt;code&gt;du -xak . &#124; sort -n &#124; awk &#039;{size=$1/1024; path=&quot;&quot;; for (i=2; i 50) { printf(&quot;%dMb %s\n&quot;, size,path); } }&#039;&lt;/code&gt;
It lists all files or directories bigger than 50MB (just change size&gt;50 to alter that) in the current directory (change the &quot;.&quot; to a directory path to specify another one) in a friendly, human-readable way and happily plays with spaces (I used it on an NTFS mount in fact).</description> <content:encoded><![CDATA[<p>I find the following works rather well&#8230;</p><p><code>du -xak . | sort -n | awk '{size=$1/1024; path=""; for (i=2; i 50) { printf("%dMb %s\n", size,path); } }'</code></p><p>It lists all files or directories bigger than 50MB (just change size&gt;50 to alter that) in the current directory (change the &#8220;.&#8221; to a directory path to specify another one) in a friendly, human-readable way and happily plays with spaces (I used it on an NTFS mount in fact).</p> ]]></content:encoded> </item> <item><title>By: Tihamer</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-45650</link> <dc:creator>Tihamer</dc:creator> <pubDate>Wed, 20 Jan 2010 18:08:31 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-45650</guid> <description>Notafan wrote:
@winfan… how do you do this in windows? you don’t :P
Well, actually, there *is* cygwin (unix commands for Windows systems)
www.cygwin.com/</description> <content:encoded><![CDATA[<p>Notafan wrote:<br
/> @winfan… how do you do this in windows? you don’t :P</p><p>Well, actually, there *is* cygwin (unix commands for Windows systems)<br
/> <a
href="http://www.cygwin.com/" rel="nofollow">http://www.cygwin.com/</a></p> ]]></content:encoded> </item> <item><title>By: notafan</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-43301</link> <dc:creator>notafan</dc:creator> <pubDate>Fri, 21 Aug 2009 21:54:50 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-43301</guid> <description>@winfan... how do you do this in windows? you don&#039;t :P</description> <content:encoded><![CDATA[<p>@winfan&#8230; how do you do this in windows? you don&#8217;t :P</p> ]]></content:encoded> </item> <item><title>By: webmaster@@@@@@@@@@@</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-42189</link> <dc:creator>webmaster@@@@@@@@@@@</dc:creator> <pubDate>Mon, 22 Jun 2009 18:39:44 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-42189</guid> <description>great job !!!!!!!!!!!</description> <content:encoded><![CDATA[<p>great job !!!!!!!!!!!</p> ]]></content:encoded> </item> <item><title>By: sridevika lover</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-42188</link> <dc:creator>sridevika lover</dc:creator> <pubDate>Mon, 22 Jun 2009 18:38:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-42188</guid> <description>thanks !!!!!!!!!!!!!!!!!</description> <content:encoded><![CDATA[<p>thanks !!!!!!!!!!!!!!!!!</p> ]]></content:encoded> </item> <item><title>By: beez</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-42148</link> <dc:creator>beez</dc:creator> <pubDate>Fri, 19 Jun 2009 22:31:14 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-42148</guid> <description>Winfan, I read this page wondering how to do these things in Windows -- can you post instructions? Thanks!</description> <content:encoded><![CDATA[<p>Winfan, I read this page wondering how to do these things in Windows &#8212; can you post instructions? Thanks!</p> ]]></content:encoded> </item> <item><title>By: Winfan</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-41186</link> <dc:creator>Winfan</dc:creator> <pubDate>Tue, 14 Apr 2009 00:04:51 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-41186</guid> <description>No wonder windows rule</description> <content:encoded><![CDATA[<p>No wonder windows rule</p> ]]></content:encoded> </item> <item><title>By: rschu68</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-38813</link> <dc:creator>rschu68</dc:creator> <pubDate>Fri, 19 Sep 2008 13:46:13 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-38813</guid> <description>find . -type f -print0&#124; xargs -0 ls -s &#124; sort -rn &#124; awk &#039;{size=$1/1024; printf(&quot;%dMb %s\n&quot;, size,$2);}&#039; &#124; head
! -print0 for filenames with spaces ...
(and xargs -0 combined)</description> <content:encoded><![CDATA[<p>find . -type f -print0| xargs -0 ls -s | sort -rn | awk &#8216;{size=$1/1024; printf(&#8220;%dMb %s\n&#8221;, size,$2);}&#8217; | head</p><p>! -print0 for filenames with spaces &#8230;<br
/> (and xargs -0 combined)</p> ]]></content:encoded> </item> <item><title>By: yanokwa</title><link>http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/#comment-38082</link> <dc:creator>yanokwa</dc:creator> <pubDate>Wed, 11 Jun 2008 15:22:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem.php#comment-38082</guid> <description>this is what i use.
&lt;code&gt;for i in G M K; do du -ah &#124; grep [0-9]$i &#124; sort -nr -k 1; done &#124; head -n 11&lt;/code&gt;</description> <content:encoded><![CDATA[<p>this is what i use.</p><p><code>for i in G M K; do du -ah | grep [0-9]$i | sort -nr -k 1; done | head -n 11</code></p> ]]></content:encoded> </item> </channel> </rss>
