<?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: Shell du command tip &#8211; estimate file space usage and exclude particular files</title> <atom:link href="http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Dan</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-143811</link> <dc:creator>Dan</dc:creator> <pubDate>Sun, 18 May 2008 13:50:07 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-143811</guid> <description>A simpler way to show directory space usage (can be inserted into a script, added to $PATH and then run from any location)
Example:
&lt;code&gt;
$du -hs &#124; cut -f1
&lt;/code&gt;
And in a script:
&lt;code&gt;
#!/bin/bash
dh -hs &#124; cut -f1
&lt;/code&gt;
You save this with the name dsu in, let&#039;s say, /usr/bin then
&lt;code&gt;
chmod +x dsu
&lt;/code&gt;
and presto, you have a directory space usage command which you can run from anywhere in the system. Not much but hope it helps.</description> <content:encoded><![CDATA[<p>A simpler way to show directory space usage (can be inserted into a script, added to $PATH and then run from any location)</p><p>Example:</p><p><code><br
/> $du -hs | cut -f1<br
/> </code></p><p>And in a script:</p><p><code><br
/> #!/bin/bash<br
/> dh -hs | cut -f1<br
/> </code></p><p>You save this with the name dsu in, let&#8217;s say, /usr/bin then</p><p><code><br
/> chmod +x dsu<br
/> </code></p><p>and presto, you have a directory space usage command which you can run from anywhere in the system. Not much but hope it helps.</p> ]]></content:encoded> </item> <item><title>By: bLaCkMeTaL</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142961</link> <dc:creator>bLaCkMeTaL</dc:creator> <pubDate>Thu, 21 Feb 2008 13:33:05 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142961</guid> <description>Thank you very much, vivek.
You tip works!</description> <content:encoded><![CDATA[<p>Thank you very much, vivek.<br
/> You tip works!</p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142959</link> <dc:creator>vivek</dc:creator> <pubDate>Thu, 21 Feb 2008 12:03:09 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142959</guid> <description>Try
&lt;code&gt;du -sh /home/ &#124; awk &#039;{ print $1}&#039;&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Try<br
/> <code>du -sh /home/ | awk '{ print $1}'</code></p> ]]></content:encoded> </item> <item><title>By: bLaCkMeTaL</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142958</link> <dc:creator>bLaCkMeTaL</dc:creator> <pubDate>Thu, 21 Feb 2008 11:35:29 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142958</guid> <description>Is it possible to filter &quot;du -sh /home&quot; output, not to show the full path (and just the space occupied)?
Example:
$ du -sh /home
8,5G    /home/
I need only the &quot;8,5G&quot; part of the output. How to do this?</description> <content:encoded><![CDATA[<p>Is it possible to filter &#8220;du -sh /home&#8221; output, not to show the full path (and just the space occupied)?</p><p>Example:<br
/> $ du -sh /home</p><p>8,5G    /home/</p><p>I need only the &#8220;8,5G&#8221; part of the output. How to do this?</p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142096</link> <dc:creator>vivek</dc:creator> <pubDate>Fri, 07 Dec 2007 14:22:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142096</guid> <description>du is installed by default and it is part of package called coreutils. Try apt-get install coreutils</description> <content:encoded><![CDATA[<p>du is installed by default and it is part of package called coreutils. Try apt-get install coreutils</p> ]]></content:encoded> </item> <item><title>By: mordur</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142095</link> <dc:creator>mordur</dc:creator> <pubDate>Fri, 07 Dec 2007 14:04:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-142095</guid> <description>is there a du for debian. apt-get install du is always end with Couldn&#039;t find package. Is the tool a piece of other package?</description> <content:encoded><![CDATA[<p>is there a du for debian. apt-get install du is always end with Couldn&#8217;t find package. Is the tool a piece of other package?</p> ]]></content:encoded> </item> <item><title>By: prince</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-141885</link> <dc:creator>prince</dc:creator> <pubDate>Sun, 18 Nov 2007 19:49:12 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-141885</guid> <description>ls -Slh&#124;head</description> <content:encoded><![CDATA[<p>ls -Slh|head</p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-140201</link> <dc:creator>vivek</dc:creator> <pubDate>Wed, 13 Jun 2007 20:10:16 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-140201</guid> <description>Scoot,
Nice and dirty hack. Thanks for sharing with us!</description> <content:encoded><![CDATA[<p>Scoot,</p><p>Nice and dirty hack. Thanks for sharing with us!</p> ]]></content:encoded> </item> <item><title>By: Scott Carlson</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-140199</link> <dc:creator>Scott Carlson</dc:creator> <pubDate>Wed, 13 Jun 2007 19:09:51 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-140199</guid> <description>I use a very similar findTop10, but I let find to the printing.
&lt;code&gt;find . -xdev -printf &#039;%s %p\n&#039;  &#124;sort -nr&#124; head  -10&lt;/code&gt;</description> <content:encoded><![CDATA[<p>I use a very similar findTop10, but I let find to the printing.<br
/> <code>find . -xdev -printf '%s %p\n'  |sort -nr| head  -10</code></p> ]]></content:encoded> </item> <item><title>By: vivek</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-140197</link> <dc:creator>vivek</dc:creator> <pubDate>Wed, 13 Jun 2007 17:54:04 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-140197</guid> <description>Penguin,
Thanks for the heads up!</description> <content:encoded><![CDATA[<p>Penguin,</p><p>Thanks for the heads up!</p> ]]></content:encoded> </item> <item><title>By: Penguin Geek</title><link>http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-140194</link> <dc:creator>Penguin Geek</dc:creator> <pubDate>Wed, 13 Jun 2007 16:37:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-du-command-examples.html#comment-140194</guid> <description>Correction on the exclude. It should read:
$ du -h --exclude=&#039;*.obj&#039;
$ du -h --exclude=&#039;*.jpg&#039;
Excellent article on du usage, and yes thanks to dreyser for the one-liner.</description> <content:encoded><![CDATA[<p>Correction on the exclude. It should read:</p><p>$ du -h &#8211;exclude=&#8217;*.obj&#8217;<br
/> $ du -h &#8211;exclude=&#8217;*.jpg&#8217;</p><p>Excellent article on du usage, and yes thanks to dreyser for the one-liner.</p> ]]></content:encoded> </item> </channel> </rss>
