<?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: Why command df and du reports different output?</title> <atom:link href="http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.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: darko</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-178245</link> <dc:creator>darko</dc:creator> <pubDate>Mon, 09 Jan 2012 07:12:08 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-178245</guid> <description>It solves problem on one server, but second one have 12 GB diif on du and df. Nobody mention this situation, couse it is very rarely - it turns to be some files hidden under mounted directory.</description> <content:encoded><![CDATA[<p>It solves problem on one server, but second one have 12 GB diif on du and df. Nobody mention this situation, couse it is very rarely &#8211; it turns to be some files hidden under mounted directory.</p> ]]></content:encoded> </item> <item><title>By: Jim Knoll</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-177249</link> <dc:creator>Jim Knoll</dc:creator> <pubDate>Tue, 20 Dec 2011 15:15:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-177249</guid> <description>one semi related thing....
other than open files inode allocations can leave phantom disk space reported by du that is not reported by ls
if some dir had crap loads of files, especially if they were long file names, the OS will create new inodes to hold all the dir info.    Even when the files are rm * the size reported by du can be quite large.   The fast way to re-coop this space it to remove the now empty dir.</description> <content:encoded><![CDATA[<p>one semi related thing&#8230;.<br
/> other than open files inode allocations can leave phantom disk space reported by du that is not reported by ls</p><p>if some dir had crap loads of files, especially if they were long file names, the OS will create new inodes to hold all the dir info.    Even when the files are rm * the size reported by du can be quite large.   The fast way to re-coop this space it to remove the now empty dir.</p> ]]></content:encoded> </item> <item><title>By: sathish</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-176911</link> <dc:creator>sathish</dc:creator> <pubDate>Tue, 13 Dec 2011 10:42:15 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-176911</guid> <description>my question if i have 3 volume gruops vg0,vg1,vg2 . and my question is one volume groups crashd so how to get that data and how to solve that?
thank u.</description> <content:encoded><![CDATA[<p>my question if i have 3 volume gruops vg0,vg1,vg2 . and my question is one volume groups crashd so how to get that data and how to solve that?<br
/> thank u.</p> ]]></content:encoded> </item> <item><title>By: tim</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-173560</link> <dc:creator>tim</dc:creator> <pubDate>Fri, 26 Aug 2011 04:30:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-173560</guid> <description>df and du measure two different things....
du reports the space used by files and folders--even this is more than the file size. A few quick experiments on my system show that 4K is a minimum file size in terms of disk space.
df reports the space used by the file system. This includes the overhead for journals and inode tables and such.</description> <content:encoded><![CDATA[<p>df and du measure two different things&#8230;.</p><p>du reports the space used by files and folders&#8211;even this is more than the file size. A few quick experiments on my system show that 4K is a minimum file size in terms of disk space.</p><p>df reports the space used by the file system. This includes the overhead for journals and inode tables and such.</p> ]]></content:encoded> </item> <item><title>By: Thiyagarajan</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-172579</link> <dc:creator>Thiyagarajan</dc:creator> <pubDate>Tue, 19 Jul 2011 12:27:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-172579</guid> <description>Thank you ! for this wonderful stuff.</description> <content:encoded><![CDATA[<p>Thank you ! for this wonderful stuff.</p> ]]></content:encoded> </item> <item><title>By: Redo</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-171440</link> <dc:creator>Redo</dc:creator> <pubDate>Fri, 20 May 2011 14:37:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-171440</guid> <description>superb, very nice info. it worked well in solving my problem.
thanks!</description> <content:encoded><![CDATA[<p>superb, very nice info. it worked well in solving my problem.</p><p>thanks!</p> ]]></content:encoded> </item> <item><title>By: Ednardo Lobo</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-169327</link> <dc:creator>Ednardo Lobo</dc:creator> <pubDate>Mon, 28 Feb 2011 12:11:02 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-169327</guid> <description>It&#039;s possible copy (cp) or link (ln) file&#039;s data after delete it (demo.txt), while vi is in running? In other words, label it (ie, name it) again?
Thank you very much!</description> <content:encoded><![CDATA[<p>It&#8217;s possible copy (cp) or link (ln) file&#8217;s data after delete it (demo.txt), while vi is in running? In other words, label it (ie, name it) again?</p><p>Thank you very much!</p> ]]></content:encoded> </item> <item><title>By: kunal</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-167603</link> <dc:creator>kunal</dc:creator> <pubDate>Sun, 02 Jan 2011 09:52:55 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-167603</guid> <description>Thanks for wonderful solution...</description> <content:encoded><![CDATA[<p>Thanks for wonderful solution&#8230;</p> ]]></content:encoded> </item> <item><title>By: rommy</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-167224</link> <dc:creator>rommy</dc:creator> <pubDate>Fri, 31 Dec 2010 06:27:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-167224</guid> <description>thanks, the problem solved!</description> <content:encoded><![CDATA[<p>thanks, the problem solved!</p> ]]></content:encoded> </item> <item><title>By: Jonas</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-158856</link> <dc:creator>Jonas</dc:creator> <pubDate>Thu, 12 Aug 2010 17:30:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-158856</guid> <description>Thank you! This article was very useful to me.</description> <content:encoded><![CDATA[<p>Thank you! This article was very useful to me.</p> ]]></content:encoded> </item> <item><title>By: Chetan Rane</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-150699</link> <dc:creator>Chetan Rane</dc:creator> <pubDate>Fri, 18 Sep 2009 13:42:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-150699</guid> <description>Hi,
My problem is solved now, I restarted mysql service, and it cleared the space for filesystem.
Thanks
Chetan</description> <content:encoded><![CDATA[<p>Hi,</p><p>My problem is solved now, I restarted mysql service, and it cleared the space for filesystem.</p><p>Thanks<br
/> Chetan</p> ]]></content:encoded> </item> <item><title>By: jnicol</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-150689</link> <dc:creator>jnicol</dc:creator> <pubDate>Thu, 17 Sep 2009 17:26:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-150689</guid> <description>Awesome, learn something new every day!
lsof on my CentOS 5 server includes a handy note if a file with an open FD has been deleted:
&lt;code&gt;# lsof -n -P &#124; grep deleted
rsync     29911      root    3r      REG               8,17  15496725683   26230786 /an/old/file (deleted)&lt;/code&gt;
kill the process, problem solved!</description> <content:encoded><![CDATA[<p>Awesome, learn something new every day!</p><p>lsof on my CentOS 5 server includes a handy note if a file with an open FD has been deleted:</p><p><code># lsof -n -P | grep deleted<br
/> rsync     29911      root    3r      REG               8,17  15496725683   26230786 /an/old/file (deleted)</code></p><p>kill the process, problem solved!</p> ]]></content:encoded> </item> <item><title>By: Chetan Rane</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-150646</link> <dc:creator>Chetan Rane</dc:creator> <pubDate>Mon, 14 Sep 2009 16:55:21 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-150646</guid> <description>Hi,
I have a similar problem, on our server we have a lvm partition which shows with df -h command
/dev/mapper/VG01-LV01    549G     514G      7.3G      99%      /u01
it shows 99 % used, whereas if i do du -sh the output is as follows.
du -sh /u01
39G        /u01/
we checked the command as lsof and it show the deleted file with big size.
my question how to resolve the problem, how can i free up the space.
will a simple reboot solve it, as it is a production system i cannot just reboot the server.
Thanks in advance.
--Chetan</description> <content:encoded><![CDATA[<p>Hi,</p><p>I have a similar problem, on our server we have a lvm partition which shows with df -h command<br
/> /dev/mapper/VG01-LV01    549G     514G      7.3G      99%      /u01<br
/> it shows 99 % used, whereas if i do du -sh the output is as follows.<br
/> du -sh /u01<br
/> 39G        /u01/</p><p>we checked the command as lsof and it show the deleted file with big size.<br
/> my question how to resolve the problem, how can i free up the space.<br
/> will a simple reboot solve it, as it is a production system i cannot just reboot the server.</p><p>Thanks in advance.</p><p>&#8211;Chetan</p> ]]></content:encoded> </item> <item><title>By: Matt</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-150524</link> <dc:creator>Matt</dc:creator> <pubDate>Fri, 04 Sep 2009 17:47:37 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-150524</guid> <description>Thank you, this was very helpful.</description> <content:encoded><![CDATA[<p>Thank you, this was very helpful.</p> ]]></content:encoded> </item> <item><title>By: sonny</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-148982</link> <dc:creator>sonny</dc:creator> <pubDate>Tue, 16 Jun 2009 21:41:52 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-148982</guid> <description>I HAVE A PROBLEM .   I HAVE A GRAPHIC MODE  DOWN DUE TO APPARENTLY NOT ENOUGH SPACE TO LOAD IT ... WHEN I TYPE  df -h it shows me this
/dev/sda1              36G   35G     0 100% /
varrun                244M  104K  244M   1% /var/run
varlock               244M     0  244M   0% /var/lock
procbususb            244M   88K  244M   1% /proc/bus/usb
udev                  244M   88K  244M   1% /dev
devshm                244M     0  244M   0% /dev/shm
lrm                   244M   33M  211M  14% /lib/modules/2.6.20-15-generic/volatile
WHICH SHOWS I HAVE NOT ENOUGH SPACE LEFT  FOR THE GRAPHIC PROCESS TO RUN
THEN RIGHT AT THE ROOT I TYPE THIS
sudo du -sk *&#124;sort -rn
31170836	home
2226844	usr
2091700	var
151540	lib
17036	boot
10788	etc
6084	sbin
4912	bin
1324	root
104	dev
24	tmp
16	lost+found
12	media
12	fdir1
8	opt
4	srv
4	prueba3
4	mnt
4	initrd
0	vmlinuz
0	sys
0	proc
0	initrd.img
0	cdrom
WHICH SHOWS THAT MY HOME PARTION IS THE ONE CAUSING THE PROBLEM
NEXT I DO THIS
cd /home
sudo du -sk *&#124;sort -rn
31169040	user1
940	user2
816	user3
20	user4
16	user5
WHICH SHOWS ME THAT DIR user1 IS USING LOTS OF SPACE
THEN I DO THIS
cd user1
sudo du -sk *&#124;sort -rn
and it shows me this
808840	Desktop
67712	archive1
30168	archive2
16112	archive3
11556	archive4
4116	archive5
1504	archive6
1024	archive7
408	archive8
168	archive9
116	archive10
32	archive11
16	archive12
16	archive13
12	archive14
12	archive15
4	archive16
4	archive17
4	archive18
4	archive19
4	archive20
4	archive21
4	archive22
0	archive23
My problem IS THAT THE HEAVY ARCHIVES DON&#039;T SEEM TO BE SHOWING THEMSELVES SO THAT I CAN ERASE THEM.. HOW CAN I LOCATE THEM?</description> <content:encoded><![CDATA[<p>I HAVE A PROBLEM .   I HAVE A GRAPHIC MODE  DOWN DUE TO APPARENTLY NOT ENOUGH SPACE TO LOAD IT &#8230; WHEN I TYPE  df -h it shows me this<br
/> /dev/sda1              36G   35G     0 100% /<br
/> varrun                244M  104K  244M   1% /var/run<br
/> varlock               244M     0  244M   0% /var/lock<br
/> procbususb            244M   88K  244M   1% /proc/bus/usb<br
/> udev                  244M   88K  244M   1% /dev<br
/> devshm                244M     0  244M   0% /dev/shm<br
/> lrm                   244M   33M  211M  14% /lib/modules/2.6.20-15-generic/volatile<br
/> WHICH SHOWS I HAVE NOT ENOUGH SPACE LEFT  FOR THE GRAPHIC PROCESS TO RUN</p><p>THEN RIGHT AT THE ROOT I TYPE THIS<br
/> sudo du -sk *|sort -rn<br
/> 31170836	home<br
/> 2226844	usr<br
/> 2091700	var<br
/> 151540	lib<br
/> 17036	boot<br
/> 10788	etc<br
/> 6084	sbin<br
/> 4912	bin<br
/> 1324	root<br
/> 104	dev<br
/> 24	tmp<br
/> 16	lost+found<br
/> 12	media<br
/> 12	fdir1<br
/> 8	opt<br
/> 4	srv<br
/> 4	prueba3<br
/> 4	mnt<br
/> 4	initrd<br
/> 0	vmlinuz<br
/> 0	sys<br
/> 0	proc<br
/> 0	initrd.img<br
/> 0	cdrom<br
/> WHICH SHOWS THAT MY HOME PARTION IS THE ONE CAUSING THE PROBLEM<br
/> NEXT I DO THIS<br
/> cd /home<br
/> sudo du -sk *|sort -rn<br
/> 31169040	user1<br
/> 940	user2<br
/> 816	user3<br
/> 20	user4<br
/> 16	user5</p><p>WHICH SHOWS ME THAT DIR user1 IS USING LOTS OF SPACE<br
/> THEN I DO THIS<br
/> cd user1<br
/> sudo du -sk *|sort -rn<br
/> and it shows me this</p><p>808840	Desktop<br
/> 67712	archive1<br
/> 30168	archive2<br
/> 16112	archive3<br
/> 11556	archive4<br
/> 4116	archive5<br
/> 1504	archive6<br
/> 1024	archive7<br
/> 408	archive8<br
/> 168	archive9<br
/> 116	archive10<br
/> 32	archive11<br
/> 16	archive12<br
/> 16	archive13<br
/> 12	archive14<br
/> 12	archive15<br
/> 4	archive16<br
/> 4	archive17<br
/> 4	archive18<br
/> 4	archive19<br
/> 4	archive20<br
/> 4	archive21<br
/> 4	archive22<br
/> 0	archive23<br
/> My problem IS THAT THE HEAVY ARCHIVES DON&#8217;T SEEM TO BE SHOWING THEMSELVES SO THAT I CAN ERASE THEM.. HOW CAN I LOCATE THEM?</p> ]]></content:encoded> </item> <item><title>By: arnike</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-147636</link> <dc:creator>arnike</dc:creator> <pubDate>Thu, 12 Mar 2009 23:02:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-147636</guid> <description>Hi
I have all the same. Does anybody know how to solve it?</description> <content:encoded><![CDATA[<p>Hi<br
/> I have all the same. Does anybody know how to solve it?</p> ]]></content:encoded> </item> <item><title>By: Martin</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-144329</link> <dc:creator>Martin</dc:creator> <pubDate>Thu, 10 Jul 2008 12:47:17 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-144329</guid> <description>thanks a lot for this hint! It worked perfectly on my machine.</description> <content:encoded><![CDATA[<p>thanks a lot for this hint! It worked perfectly on my machine.</p> ]]></content:encoded> </item> <item><title>By: pankaj</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-142775</link> <dc:creator>pankaj</dc:creator> <pubDate>Mon, 04 Feb 2008 11:49:14 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-142775</guid> <description>hi
I have the same problem with TRUE64 Unix.
I have fileset as /usr which is showing me  3021256KB used after df -k &amp; after du -k it is showing me 1648760KB.
Please give me solution to resolve this problem.</description> <content:encoded><![CDATA[<p>hi</p><p>I have the same problem with TRUE64 Unix.</p><p>I have fileset as /usr which is showing me  3021256KB used after df -k &amp; after du -k it is showing me 1648760KB.</p><p>Please give me solution to resolve this problem.</p> ]]></content:encoded> </item> <item><title>By: Bu</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-141543</link> <dc:creator>Bu</dc:creator> <pubDate>Thu, 25 Oct 2007 14:19:02 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-141543</guid> <description>Hello, I have the same problem, but the solution you proposed just don&#039;t work for me.
I have my /var folder quite full : 2.7go of 2.8go, that&#039;s what&#039;s indicated by &quot;df&quot; command, while &quot;du&quot; states only 628mo... Nothing strange pointed out by &quot;lsof&quot;, only a few files of less than 1mo showed up.
Pretty annoying...
Thanks in advance for any help</description> <content:encoded><![CDATA[<p>Hello, I have the same problem, but the solution you proposed just don&#8217;t work for me.<br
/> I have my /var folder quite full : 2.7go of 2.8go, that&#8217;s what&#8217;s indicated by &#8220;df&#8221; command, while &#8220;du&#8221; states only 628mo&#8230; Nothing strange pointed out by &#8220;lsof&#8221;, only a few files of less than 1mo showed up.<br
/> Pretty annoying&#8230;<br
/> Thanks in advance for any help</p> ]]></content:encoded> </item> <item><title>By: NykO18</title><link>http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-140834</link> <dc:creator>NykO18</dc:creator> <pubDate>Fri, 17 Aug 2007 08:18:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/freebsd-why-command-df-and-du-reports-different-output.html#comment-140834</guid> <description>Thank you so much, because your solution (although strange at first) worked perfectly on one of our servers that were stating 5.1 Go instead of 4.5 Go. Unfortunately, repeating the same operation on the second server that has the same problem didn&#039;t worked. I&#039;m stil looking for a solution.</description> <content:encoded><![CDATA[<p>Thank you so much, because your solution (although strange at first) worked perfectly on one of our servers that were stating 5.1 Go instead of 4.5 Go. Unfortunately, repeating the same operation on the second server that has the same problem didn&#8217;t worked. I&#8217;m stil looking for a solution.</p> ]]></content:encoded> </item> </channel> </rss>
