LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   wierd diskspace usage (https://www.linuxquestions.org/questions/linux-newbie-8/wierd-diskspace-usage-478268/)

kniwor 08-28-2006 10:03 PM

wierd diskspace usage
 
k, here is the problem, there's this user on the system, no quota being enabled on the user, using about 4G of diskspace, and i cant figure out where it is, when i do the following
du -hs /home/*
it gives 3.8G to be the size of his home directory.
but when i run the following command
du -hs /home/<the_user>/*
nothing is larger than a few Mb, and cat add up to 3.8Gb in any way.

I also tried
"ls -al" to see if any directories starting with "." are made but there's nothing too large.

i need some help here.

zhangmaike 08-28-2006 10:53 PM

If it says 3.8G, then you're using 3.8G. Space adds up, even if it's only a few meg. du doesn't lie.

For the user with the 3.8G home directory, try:
Code:

du -csh /home/<the_user>/*
The -c option will add the sizes up for you and print the total usage at the end.

If you want to find out how much space your dotfiles are using, do, from within /home/<the_user>:
Code:

du -csh $(ls -A)
This will total up absolutely everything within the <the_user>'s home directory.

It sounds like the 3.8G of usage is just spread out rather than isolated to one or two directories/files.

If you want to quickly find the larger of these directories/files:
Code:

ls -rlash --sort=size
should work well. The larger files will be sorted toward the bottom.

kniwor 08-29-2006 06:36 AM

k, really sorry again,
Quote:

du -chs $(ls -A) | grep G
told me that the guys had 3G in his trash, and 700Mb was the total space he was using, which i never expected.


All times are GMT -5. The time now is 01:51 PM.