LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-29-2005, 08:46 PM   #1
liyuefu
LQ Newbie
 
Registered: Jun 2005
Posts: 16

Rep: Reputation: 0
df gets different result from du?


I got a strang problem.

I have a partion /u01, when I check its space, the result of
df and du is different.

[root@spp-db3 u01]# du -sh /u01
4.5G /u01
[root@spp-db3 u01]# df -h /u01
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 20G 9.2G 9.1G 51% /u01
[root@spp-db3 u01]#

df says I have used 9.2G, and 9.1G left, and du says it is only used 4.5G.
I can't find which file occupies the space 9.2G - 4.5G = 4.7G.

thanks a lot.
 
Old 10-01-2005, 02:13 AM   #2
Talavis
LQ Newbie
 
Registered: May 2005
Location: Stockholm, Sweden
Distribution: Slackware-current
Posts: 22

Rep: Reputation: 15
Did you use du as root? If I'm not wrong, du will skip archives it has no permissions to, while df still counts them.
 
Old 10-01-2005, 09:44 AM   #3
liyuefu
LQ Newbie
 
Registered: Jun 2005
Posts: 16

Original Poster
Rep: Reputation: 0
I did use root to run du

I know there maybe some difference between df and du , but I don't think
the difference is so big, it's about 4G.

the directory is /u01, which is used by oracle.
Maybe it's because of oracle?
 
Old 10-01-2005, 10:08 AM   #4
hondo
Member
 
Registered: Jul 2005
Location: norway
Posts: 198

Rep: Reputation: 33
I think the df command checks how much disk space is avalible and used on one partition and the du command can check files, directories and other. I have serveral file systems in one partition and when i specified for example /home which is one of them, i got the size of the partition which not only is used for the /home directory. I used the df command.

Last edited by hondo; 10-01-2005 at 10:09 AM.
 
Old 10-01-2005, 10:45 AM   #5
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 47
yeah, df shows the amount of space left on the entire filesystem. man df
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ping result. bruse Linux - Networking 1 11-18-2005 04:53 PM
ping result. bruse Linux - Networking 1 11-18-2005 04:52 PM
Result = 100? bigoli MEPIS 7 06-09-2005 04:30 PM
df -h wrong result ? csrh Linux - General 2 03-08-2005 08:35 AM
seems to be working but no result ZairSadiqov Linux - Networking 1 01-20-2005 06:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:35 PM.

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