LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-18-2011, 05:18 AM   #1
dan.hoquoc
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Rep: Reputation: Disabled
du -sh command does not reflex a real used capacity!


Hi all,

bash-3.00$ df -h
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d5 44G 40G 3.1G 93% /u01

but

bash-3.00$ du -sh /u01
9.7G /u01

My question is: Why the fist command tell me 40G used but the second command tell me different result?

My system info:

SunOS INSP-DB1 5.10 Generic_142909-17 sun4u sparc SUNW,SPARC-Enterprise

Thank you!
Dan.
 
Old 07-18-2011, 05:49 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
The answer depends a little on what exactly is inside your /u01. See for example this for a quick clarification. The df and du programs calculate the values in a different manner, and therefore the results are hardly ever exactly the same. If there is a big difference, I'd suspect that the target contains either external filesystems mounted under it, links (the handling of which depends on the tool and possibly command line options) or even data that is still in use although it is not linked to by filenames anymore, e.g., it is seemingly deleted, but not closed.

To get more clear results, you should inspect what the mounted filesystem actually contains, and read carefully what df and du calculate.
 
1 members found this post helpful.
Old 07-19-2011, 01:21 AM   #3
dan.hoquoc
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
Thanks b0uncer!

It's useful post.
Dan.
 
Old 07-22-2011, 04:15 AM   #4
dan.hoquoc
LQ Newbie
 
Registered: Jul 2011
Posts: 16

Original Poster
Rep: Reputation: Disabled
Hi b0uncer,

Please help for detail how to solve this problem.

Today i checked and found:

Filesystem size used avail capacity Mounted on
/dev/md/dsk/d5 44G 38G 5.2G 89% /u01

bash-3.00$ du -sh /u01
2.7G /u01

Thank you!
Dan.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Will Linux Run My Old Reflex 2.0 database program? rootes1 Linux - Newbie 4 06-05-2011 04:52 PM
which is the geek reflex speed?! juanctes General 0 06-14-2008 09:27 AM
how many users / home capacity over command line laucian Linux - Newbie 4 02-20-2008 08:06 AM
help with cd command.....For real Gavin Linux - General 2 11-17-2001 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration