LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   HD space not going up after deleting files (https://www.linuxquestions.org/questions/linux-newbie-8/hd-space-not-going-up-after-deleting-files-200563/)

MikeZila 07-03-2004 12:30 AM

HD space not going up after deleting files
 
I've since gotten a new HDD, so I don't have this problem any more. I am still looking for an explination. I sort of overshot the runnway a bit when I installed Quake3 on my Slack box. I didn't have enough space to finish the install, the HD was full. It was like two in the morning, and I wanted to go to sleep. So I shut down and went to bed. I woke up the next morning, turned on my PC and booted Slack. I type the good old "startx", KDE gets as far as the spash screen before dying. Telling me I was out of disk space. I figure "Meh. I'll go delete that crap." I do so, and try to "startx" again. Same deal. Also, even though the files are gone, it would appear that my free space had not gone up.

Please advise.

Dark_Helmet 07-03-2004 12:44 AM

How are your partitions set up? If you have a separate partition for /home, /usr, or other areas, then deleting files from them may not help the situation. I honestly don't know where KDE writes its files on startup. It could be your user directory in /home, it could be in /tmp, or some other spot.

If you like, you can track down where the space is consumed with the du and df commands. Do a "df -h" for each mounted filesystem you have. If you see any partition at 98 or 99% used, then you've found the filesystem that needs cleaning :)

Then you can use "du -hs *" in each directory to hunt down where the majority of space is used.

MikeZila 07-03-2004 11:22 AM

I can still login to KDE if I use root, so I used Kdiskfree to look at my disks.

I've got two Linux partitions, one for the root, and one for swap. I have no seperate /usr partition.
my root partition is 100% full. The problem is that I've deleted my entire Q3 install. Around 500mb of files, yet my disk is still 100% used. I don't want his happening again.

What is the standard command to delete files from the console? Its "rm" isn't it?

Dark_Helmet 07-03-2004 11:30 AM

Yeah, rm is the command.

I've got a question though: When deleting files in KDE, do they go to a "Trash Can" or somethin glike that? In Gnome they do. The trash can is simply a hidden directory that the files are moved to and you need to manually empty the trash before you reclaim the space. Just a possibility for you to check on.

MikeZila 07-03-2004 11:47 PM

I thought of that too. But no, there are seperate "Send to Trash" and "Delete" commands in KDE. I checked the Trash can too, it was empty. Still stumped.

Please advise.

Dark_Helmet 07-04-2004 12:17 AM

Tell you what, I'll write up a quick script, find command, or both that will spit out a text file listing every directory on your system and its size in bytes/kilobytes/megabytes, and then you can inspect the "big spenders" so to speak for files you can get rid of. It might take a while for it to run ;)

I'll reply with it once I write it up. Shouldn't take long.

MikeZila 07-04-2004 09:19 AM

That would be very helpfull. Can't wait to hunt down the directory thats eating all of my harddisk space. Thank you very much for helping.

Dark_Helmet 07-04-2004 02:09 PM

You're more than welcome.

Unfortunately, writing a script to do all this turns out to be non-trivial. At least, non-trivial for my scripting abilities. I plan to keep working on it, because it's something I'd like to have around (a nice summary of disk usage mailed nightyl/weekly/whatever). In the meantime, you could do something like this:

du -s * | sort -n -r

That will give you a list of files and subdirectories in order of most disk usage to least. The numbers represent the total blocks used. To get an idea of what they mean, you can:

du -hs *

That will print out the sizes in KB, MB, and GB. You can't pipe it into sort though, because the K, M, and G suffixes screw up the numeric sort.

Anyway, using the first command, you can then go into the biggest space hog directory, and issue the command again. Do that repeatedly to "walk" down into the directory that's eating your space and identify what file(s) are the culrpits.

At least that can get you doing something while I fight with this script.

MikeZila 07-04-2004 09:04 PM

There you are! You bastards!
 
Using the first method you gave me, I was able to find a hidden CD image in my "Home" directory. It was hidden because some lame download manager I used to use seems to think its a good idea to save "backups" of everything. This directory is loaded with crap I haven't seen or used in over a year. All in all more than two gigs of junk, mostly backups of old packages. Jeez, rm em' all. Killed that heap of detritus and now KDE starts just fine. Thank you for all your help.

PS: Keep going with that script, after this mess I got myself into, the script your talking about is something I would be more than happy downloading and using. Good luck with it.


All times are GMT -5. The time now is 02:10 AM.