LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2009, 05:57 AM   #1
jamie2teach
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Rep: Reputation: 0
The DU command and DF command, Different Outputs???


Hi to all,

I read an article to why the DF command and DU command can give you different outputs and the general gist of the article was that the DF command looks at different information, regarding something called open files?

Article in question: http://www.cyberciti.biz/tips/freebs...nt-output.html

My question is how do I get the DF command to relate to the DU command because at the moment they are out by quite a lot. 12GB in fact. How do I re-sync the output so they are at least similar?

Thanks to all that reply.
 
Old 07-10-2009, 12:45 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,374

Rep: Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383Reputation: 2383
They will tend to differ on large/busy systems, you just have to be aware that they are DIFFERENT cmds.

You should read these pages carefully
http://linux.die.net/man/1/du
http://linux.die.net/man/1/df

and note the different switches available. Pay particular attention to things like --si (see http://en.wikipedia.org/wiki/Gibibyte) for more detail. Also --apparent-size etc.
 
Old 07-10-2009, 05:10 AM   #3
jamie2teach
LQ Newbie
 
Registered: Jul 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Do you know how to re-sync so they can give me the same result i.e. get rid of the files that are causing the difference. When I run the lsof command and specify the directory I can see which files they are and just want to be able to get rid of them for good.
 
Old 07-10-2009, 07:25 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
You are not going to "re-sync" or delete files to make DU and DF give you the same answer!! They are each giving you different information about the filesystem / storage device. They are not supposed to give the same answer----What would be the purpose of trying to force them to?
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] append command output to file by giving command in terminal sumeet inani Linux - Newbie 4 07-03-2009 10:36 AM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 02:14 AM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM
Sox recording command outputs blank files anid.iitk Linux - Newbie 2 05-29-2006 01:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:09 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration