Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
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.
This is the result of du -h --max-depth /home/user/
What is weird here is that the total size it shows for /home/user is 2.5G. But the sum of all the files and folders ie the sum of sizes of the first columns of all the rows except the last row is only 800M. Where is the other 1+G space gone?
I have checked by issuing lsof +L1 for uncleared inodes. But none of the file in /home/user is found in that. My problem is I have only 2.5G quota for the user which now prevents me doing anything in the account.
Can anybody please point me to the right direction?
The --max-depth option requires an argument. Indeed if I run
Code:
$ du -h --max-depth /home/colucix
du: invalid maximum depth `/home/colucix'
Try `du --help' for more information.
I got the error above. Anyway, your command already takes care of hidden directories. But the output of du doesn't list the files inside /home/user (by default it lists only directories). Maybe have you got some large file inside /home/user?
To take care of the files under the top level directory you need the -a option:
Sorry for the confusion guys. Actually I originally ran the command with the --max-depth=1 (you are right, it would err had it been run without the value).
I tried both as the user who owns the directory and as the root user. I get the same results in both the cases.
I just tried with -a option as well. It is still the same ie 1.3G when I sum up the first columns but getting a 2.5G as the dir size as reported by the du.
If not the Friday evening to blame, it is stupid and greedy myself.
1. I did not issue 'du' command with the '-a' option which missed out the files under the /home/user/ directory.
2. Even after SecretCode pointed this out, I calculated the disk size with the same spreadsheet which contained a buggy formula which missed out files with Gig sizes.
After colucix's post, I issued the 'ls -al' with an additional 'h' from which I accidentally noticed the offensive .xsession-errors and .xsession-errors.old files of which the xsession-errors.old file was 1.3G.
Though the original issue is solved, why the .xsession-errors.old is 1.3G? Shall I just delete this file? I am using this home directory on CentOS 5.x and Fedora 14 & 15.
Though the original issue is solved, why the .xsession-errors.old is 1.3G? Shall I just delete this file? I am using this home directory on CentOS 5.x and Fedora 14 & 15.
Considering it is a text file, 1.3G is a very huge size! Maybe you have an error which repeats multiple times in a minute. You can delete it without problems, but your system will create it again if you don't address the issue. You can try to open it with vi or
Code:
tail -300 .xsession-errors
to see what is the repeating error message. Then, feel free to open a new thread to give this new issue more visibility. Cheers!
The culprit was google-chrome. It kept writing to the xsession-errors file madly. It filled more than a gig disk space within an hour. I don't have time to get to the bottom of this chrome issue; but stopped using chrome and started using firefox.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.