<?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: Linux Find Large Files</title> <atom:link href="http://www.cyberciti.biz/faq/find-large-files-linux/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/find-large-files-linux/</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: Alastair</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-67735</link> <dc:creator>Alastair</dc:creator> <pubDate>Sat, 04 Feb 2012 14:05:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-67735</guid> <description>Thanks! It&#039;s embarrassing to admit this but error logs nearly filled up my VPS&#039;s storage allotment.</description> <content:encoded><![CDATA[<p>Thanks! It&#8217;s embarrassing to admit this but error logs nearly filled up my VPS&#8217;s storage allotment.</p> ]]></content:encoded> </item> <item><title>By: Tom scott</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-64477</link> <dc:creator>Tom scott</dc:creator> <pubDate>Wed, 16 Nov 2011 02:13:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-64477</guid> <description>How would i delete a directory that has gone above say 10GB?
-size shows differently for files and directories.</description> <content:encoded><![CDATA[<p>How would i delete a directory that has gone above say 10GB?<br
/> -size shows differently for files and directories.</p> ]]></content:encoded> </item> <item><title>By: Warren</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-62706</link> <dc:creator>Warren</dc:creator> <pubDate>Fri, 23 Sep 2011 01:38:18 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-62706</guid> <description>Jonny, Georges is afraid because he is talking of a tail, had be been talking of a head he might have been otherwise.</description> <content:encoded><![CDATA[<p>Jonny, Georges is afraid because he is talking of a tail, had be been talking of a head he might have been otherwise.</p> ]]></content:encoded> </item> <item><title>By: Jonny</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-61609</link> <dc:creator>Jonny</dc:creator> <pubDate>Tue, 16 Aug 2011 17:57:16 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-61609</guid> <description>Why are you afraid?</description> <content:encoded><![CDATA[<p>Why are you afraid?</p> ]]></content:encoded> </item> <item><title>By: Erwin</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-60854</link> <dc:creator>Erwin</dc:creator> <pubDate>Tue, 19 Jul 2011 21:20:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-60854</guid> <description>super awesome ;)</description> <content:encoded><![CDATA[<p>super awesome ;)</p> ]]></content:encoded> </item> <item><title>By: skater</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-60385</link> <dc:creator>skater</dc:creator> <pubDate>Fri, 01 Jul 2011 16:07:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-60385</guid> <description>My tips that put together some of the above
#This lists the files in the current directory ordered by size with bigger at end...
#..so you do not have to scroll up ;)
ls -alSr
#This lists the files and the directories in the current directory as well sorted by
# size with bigger at end... Useful in my case because I often have a directory
# and a tar of the dir as a quick back...
du -ks ./* &#124; sort -n
bis
S</description> <content:encoded><![CDATA[<p>My tips that put together some of the above</p><p>#This lists the files in the current directory ordered by size with bigger at end&#8230;<br
/> #..so you do not have to scroll up ;)<br
/> ls -alSr</p><p>#This lists the files and the directories in the current directory as well sorted by<br
/> # size with bigger at end&#8230; Useful in my case because I often have a directory<br
/> # and a tar of the dir as a quick back&#8230;<br
/> du -ks ./* | sort -n</p><p>bis<br
/> S</p> ]]></content:encoded> </item> <item><title>By: Pejman</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-59568</link> <dc:creator>Pejman</dc:creator> <pubDate>Mon, 23 May 2011 05:50:21 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-59568</guid> <description>tnx to everyone. great sharing :)
here is the same command but has filter for just *.log files.
to find huge log files on linux:
&lt;pre&gt;
find . -size +1000k -name *.log -print0 &#124; xargs -0 ls –lSh
&lt;/pre&gt;
good luck.</description> <content:encoded><![CDATA[<p>tnx to everyone. great sharing :)</p><p>here is the same command but has filter for just *.log files.<br
/> to find huge log files on linux:</p><pre>
find . -size +1000k -name *.log -print0 | xargs -0 ls –lSh
</pre><p>good luck.</p> ]]></content:encoded> </item> <item><title>By: Binu</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-55063</link> <dc:creator>Binu</dc:creator> <pubDate>Fri, 21 Jan 2011 12:10:09 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-55063</guid> <description>find -size +50M -printf &quot;%s %p\n&quot;
&#039;man find&#039; will tell you other printf options.</description> <content:encoded><![CDATA[<p>find -size +50M -printf &#8220;%s %p\n&#8221;</p><p>&#8216;man find&#8217; will tell you other printf options.</p> ]]></content:encoded> </item> <item><title>By: gunjankapoor</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-53845</link> <dc:creator>gunjankapoor</dc:creator> <pubDate>Tue, 28 Dec 2010 05:31:09 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-53845</guid> <description>To finds  files = 50,000KB (50MB+) in size and display their names, along with size.
(The size should be exact).
What will be the command?</description> <content:encoded><![CDATA[<p>To finds  files = 50,000KB (50MB+) in size and display their names, along with size.<br
/> (The size should be exact).<br
/> What will be the command?</p> ]]></content:encoded> </item> <item><title>By: Albert</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-53301</link> <dc:creator>Albert</dc:creator> <pubDate>Wed, 22 Dec 2010 18:06:59 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-53301</guid> <description>Hi everyone!!
i have a litle problem, i have this
find /home/dir  -exec  grep -H -w &quot;op1&quot; {} \; &#124; grep -w &quot;op2&quot;
I want to show the name and the size  of specific files who have some content
ls -l (filename) &#124; awk &#039;{sum = sum + $5} END {print sum}&#039;
i been trying put this together but no luck</description> <content:encoded><![CDATA[<p>Hi everyone!!<br
/> i have a litle problem, i have this</p><p> find /home/dir  -exec  grep -H -w &#8220;op1&#8243; {} \; | grep -w &#8220;op2&#8243;</p><p>I want to show the name and the size  of specific files who have some content</p><p> ls -l (filename) | awk &#8216;{sum = sum + $5} END {print sum}&#8217;</p><p>i been trying put this together but no luck</p> ]]></content:encoded> </item> <item><title>By: Lesle Boyd</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-53184</link> <dc:creator>Lesle Boyd</dc:creator> <pubDate>Wed, 22 Dec 2010 00:17:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-53184</guid> <description>You guys are the greatest!
I sure enjoyed reading this thread and the information is extremely useful in my job.
Thanks  to all who posted. My head is swimming!</description> <content:encoded><![CDATA[<p>You guys are the greatest!<br
/> I sure enjoyed reading this thread and the information is extremely useful in my job.<br
/> Thanks  to all who posted. My head is swimming!</p> ]]></content:encoded> </item> <item><title>By: Michael</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-46886</link> <dc:creator>Michael</dc:creator> <pubDate>Thu, 15 Apr 2010 04:46:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-46886</guid> <description>Jonathan,
That Perl one-liner is a work of art. Thank you for sharing it with the world!</description> <content:encoded><![CDATA[<p>Jonathan,</p><p>That Perl one-liner is a work of art. Thank you for sharing it with the world!</p> ]]></content:encoded> </item> <item><title>By: Deepankar</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-46813</link> <dc:creator>Deepankar</dc:creator> <pubDate>Fri, 09 Apr 2010 04:56:04 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-46813</guid> <description>Try
cd (directory path)
du -h &#124; grep [0-9]G
This will list all files that are in GB.
Suppose you want to do the same for files in MB the replace &quot;G&quot; with &quot;M&quot; in the above.
The command can be made more specific as to what you call a large file (in 10s of GB or 100s of GB ) by using regexp &quot;?&quot; instead of  &quot;[0-9]&quot;</description> <content:encoded><![CDATA[<p>Try<br
/> cd (directory path)<br
/> du -h | grep [0-9]G</p><p>This will list all files that are in GB.<br
/> Suppose you want to do the same for files in MB the replace &#8220;G&#8221; with &#8220;M&#8221; in the above.</p><p>The command can be made more specific as to what you call a large file (in 10s of GB or 100s of GB ) by using regexp &#8220;?&#8221; instead of  &#8220;[0-9]&#8220;</p> ]]></content:encoded> </item> <item><title>By: Deepankar</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-46812</link> <dc:creator>Deepankar</dc:creator> <pubDate>Fri, 09 Apr 2010 04:53:33 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-46812</guid> <description>Try
cd
du -h &#124; grep [0-9]G
This will list all files that are in GB.
Suppose you want to do the same for files in MB the replace &quot;G&quot; with &quot;M&quot; in the above.
The command can be made more specific as to what you call a large file (in 10s of GB or 100s of GB ) by using regexp &quot;?&quot; instead of  &quot;[0-9]&quot;</description> <content:encoded><![CDATA[<p>Try<br
/> cd<br
/> du -h | grep [0-9]G</p><p>This will list all files that are in GB.<br
/> Suppose you want to do the same for files in MB the replace &#8220;G&#8221; with &#8220;M&#8221; in the above.</p><p>The command can be made more specific as to what you call a large file (in 10s of GB or 100s of GB ) by using regexp &#8220;?&#8221; instead of  &#8220;[0-9]&#8220;</p> ]]></content:encoded> </item> <item><title>By: Keith White</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-46779</link> <dc:creator>Keith White</dc:creator> <pubDate>Wed, 07 Apr 2010 10:43:17 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-46779</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 &lt;code&gt;size&gt;50&lt;/code&gt; 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 <code>size&gt;50</code> 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: ronald kriwelz simanjuntak</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-45587</link> <dc:creator>ronald kriwelz simanjuntak</dc:creator> <pubDate>Fri, 15 Jan 2010 22:11:20 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-45587</guid> <description>owh yes, i forgot to say that it will list all the files bigger than 10MB,since wut i ned is to list biggest files, and yeah ur addition to the command does the thing :)
or u can add &quot;more&quot;  to the command
the power of command line, the beauty of linux :)</description> <content:encoded><![CDATA[<p>owh yes, i forgot to say that it will list all the files bigger than 10MB,since wut i ned is to list biggest files, and yeah ur addition to the command does the thing :)<br
/> or u can add &#8220;more&#8221;  to the command<br
/> the power of command line, the beauty of linux :)</p> ]]></content:encoded> </item> <item><title>By: Scott Carlson</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-45578</link> <dc:creator>Scott Carlson</dc:creator> <pubDate>Fri, 15 Jan 2010 14:44:24 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-45578</guid> <description>@ronald
Interesting.  I dug a bit.  My use case is find the largest files in a directory and not just those over 10M.  So I had removed the size restriction, but the same problem occurs with a smaller size restriction.    Even with &quot;-size +100k&quot; find was returning directories as well as files.  This messed up the expected results as I previously saw.
So for me, this one works as expected.
find . -type f -print0 &#124; xargs -0 ls -lSh &#124; head -20
Thanks.</description> <content:encoded><![CDATA[<p>@ronald</p><p>Interesting.  I dug a bit.  My use case is find the largest files in a directory and not just those over 10M.  So I had removed the size restriction, but the same problem occurs with a smaller size restriction.    Even with &#8220;-size +100k&#8221; find was returning directories as well as files.  This messed up the expected results as I previously saw.</p><p>So for me, this one works as expected.<br
/> find . -type f -print0 | xargs -0 ls -lSh | head -20</p><p>Thanks.</p> ]]></content:encoded> </item> <item><title>By: ronald kriwelz simanjuntak</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-45573</link> <dc:creator>ronald kriwelz simanjuntak</dc:creator> <pubDate>Fri, 15 Jan 2010 04:02:21 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-45573</guid> <description>wut do you mean by it doesnt work across subdirectories ? i tried it on my ubuntu box and it show files in the subdirectories.
-rw-rw---- 1 mysql mysql 412M Jan 15 10:18 /var/lib/mysql/darta/namefile.MYD
-rw-rw---- 1 mysql mysql 173M Jun  9  2009 /var/lib/mysql/flyingfight/dbacomment.MYD
-rw-rw---- 1 mysql mysql 165M Jan 15 10:40 /var/lib/mysql/interndba/post.MYI
-rw-rw---- 1 mysql mysql 159M Jan 15 10:40 /var/lib/mysql/interndba/post.MYD
-rw------- 1 root  root  105M Jan 10 03:31 /var/log/messages.1
those files are in different subdirectories right?</description> <content:encoded><![CDATA[<p>wut do you mean by it doesnt work across subdirectories ? i tried it on my ubuntu box and it show files in the subdirectories.<br
/> -rw-rw&#8212;- 1 mysql mysql 412M Jan 15 10:18 /var/lib/mysql/darta/namefile.MYD<br
/> -rw-rw&#8212;- 1 mysql mysql 173M Jun  9  2009 /var/lib/mysql/flyingfight/dbacomment.MYD<br
/> -rw-rw&#8212;- 1 mysql mysql 165M Jan 15 10:40 /var/lib/mysql/interndba/post.MYI<br
/> -rw-rw&#8212;- 1 mysql mysql 159M Jan 15 10:40 /var/lib/mysql/interndba/post.MYD<br
/> -rw&#8212;&#8212;- 1 root  root  105M Jan 10 03:31 /var/log/messages.1</p><p>those files are in different subdirectories right?</p> ]]></content:encoded> </item> <item><title>By: Scott Carlson</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-45564</link> <dc:creator>Scott Carlson</dc:creator> <pubDate>Thu, 14 Jan 2010 16:08:50 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-45564</guid> <description>@ronald
Your find doesn&#039;t work across subdirectories.  It&#039;s definitely very clean for a leaf directory though.</description> <content:encoded><![CDATA[<p>@ronald</p><p>Your find doesn&#8217;t work across subdirectories.  It&#8217;s definitely very clean for a leaf directory though.</p> ]]></content:encoded> </item> <item><title>By: ronald kriwelz simanjuntak</title><link>http://www.cyberciti.biz/faq/find-large-files-linux/#comment-45562</link> <dc:creator>ronald kriwelz simanjuntak</dc:creator> <pubDate>Thu, 14 Jan 2010 10:49:25 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=2822#comment-45562</guid> <description>how bout using this :
find /var -size +10000k -print0 &#124; xargs -0 ls -lSh
this will list all files in /var directory,sort it in  descending order and in more human readable format :)</description> <content:encoded><![CDATA[<p>how bout using this :<br
/> find /var -size +10000k -print0 | xargs -0 ls -lSh</p><p>this will list all files in /var directory,sort it in  descending order and in more human readable format :)</p> ]]></content:encoded> </item> </channel> </rss>
