Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Disk Usage Question

    This is probably something stupid that I am overlooking, but can't quite seem to find it and have not found an answer online. Possibly I just suck at searching. When testing a script to display my disk usage I found the numbers for /home don't add up. I seem to be missing 5GB somewhere:

    rootatlocalhost:~# du -sh /home/*
    16K /home/lost+found
    9.3G /home/user

    Just over 9.3GB total for /home, however when I run df-h it shows 14G as being used.

    rootatlocalhost:~# df -h
    Filesystem Size Used Avail Use% Mounted on
    [irrelevant info deleted]
    /dev/sda3 280G 14G 252G 6% /home

    This is a fairly big discrepancy for such a small amount of data in the home directory. I am sure I am just overlooking something silly, but can't seem to figure out what it is. There is obviously plenty of free space so that is not an issue and won't be for some time, just trying to figure out what I am missing. The file system is ext4.

    Anyone have any ideas?

  2. #2
    peculiar...tried a reboot?

  3. #3
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Two thoughts:
    - Afaik * doesnt include hidden files and directories
    - There might be deleted files, which are still held open by a running process. Check with "lsof |grep -i deleted"
    You must always face the curtain with a bow.

  4. $spacer_open
  5. #4
    Quote Originally Posted by Irithori View Post
    - Afaik * doesnt include hidden files and directories
    Irithori is correct (just checked), hidden files will not be checked by du using the *, that is.
    Last edited by atreyu; 08-19-2012 at 09:25 PM. Reason: asterisk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts