Find the answer to your Linux question:
Results 1 to 4 of 4
Hi there, I seem to have encountered a 'problem' with the storage on my HDD. When i 'du -skh /home/Data' , i get : 243G /home/Data And when i 'du ...
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    1

    Disk usage confusion

    Hi there,

    I seem to have encountered a 'problem' with the storage on my HDD.

    When i 'du -skh /home/Data' , i get :

    243G /home/Data

    And when i 'du -skh /home/Data/*' , i get :

    122G /home/Data/
    64G /home/Data/Clients
    51M /home/Data/For_Transfers
    8.0K /home/Data/Onrig_Runs
    58G /home/Data/Runs

    NOW, when i do 'du -skh *' from within /home/Data i get :

    122G
    64G Clients
    51M For_Transfers
    8.0K Onrig_Runs
    58G Runs

    It seems like there is 122G being used but i can 'ls' it. Is it perhaps hidden somewhere?

    It does not come up with df ot fdisk

    Help!

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    It isn't showing you incorrectly. Each example is totaling about 243G (more or less). There are 122G in files in the /home/Data directory, and about the same in sub-directories. So, you aren't "missing" 122G.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    You should also be aware that links of various sorts will skew the results of the du command. It is only intended as an advisory tool, and not something to base system resource allocations on. For example, if I have a hard link to a mongo big database that is elsewhere on the disc, my directory will show that as part of the results returned from du. If that were considered part of my quota, then I would be toast. It also traverses links to other file systems and counts those as well, unless you include the -x option. Please read the du manpage to get a better understanding how to use it more effectively.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Finally, an example of how du can be mis-interpreted. On my system, my /home file system is a 2TB array. It is about 52% used right now, leaving about 860GB available. However when I run "du /home/mydir" it traverses all my links - including my NAS arrays, eSata drives, and usb drive(s). It comes back and tells me that I am using 1.7TB of space, though I know that is impossible! Caveat User!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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