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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-29-2005, 08:46 PM
|
#1
|
LQ Newbie
Registered: Jun 2005
Posts: 16
Rep:
|
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.
|
|
|
10-01-2005, 02:13 AM
|
#2
|
LQ Newbie
Registered: May 2005
Location: Stockholm, Sweden
Distribution: Slackware-current
Posts: 22
Rep:
|
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.
|
|
|
10-01-2005, 09:44 AM
|
#3
|
LQ Newbie
Registered: Jun 2005
Posts: 16
Original Poster
Rep:
|
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?
|
|
|
10-01-2005, 10:08 AM
|
#4
|
Member
Registered: Jul 2005
Location: norway
Posts: 198
Rep:
|
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.
|
|
|
10-01-2005, 10:45 AM
|
#5
|
Senior Member
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016
Rep:
|
yeah, df shows the amount of space left on the entire filesystem. man df 
|
|
|
All times are GMT -5. The time now is 02:35 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|