Ok so my Mandriva home is full again. What are the best superduper commands to sort find and fix junk? I have 380 Gigs of it so I suspect there is something wrong with a backup location or something. Edit: I guess finding anything over 1G in /home will get me started:
The -b switch tells du to output size in bytes, which makes 'sort', later on, more useful.
-d or --max-depth=N controls how far 'du' recurses into the filesystem in reporting size, which is all the way by default. This can help shorten the list at first pass, to get something of an overview.
/download is the point in the filesystem where du starts working.
| is a pipe symbol, which takes the output of the command before this symbol and feeds it to the command after.
-n tells sort to do a numeric sort.
-r reverses the sort order, putting big numbers at the top, which is more interesting to us in this case.
less is a 'pager', giving results one screen at a time, so we don't have to scroll back through a giant list. It might work as well to leave off -r and | less, leaving us at the end of the list with the big boys.
Armed with the general location of high disk usage, we can use a more pinpointed starting directory in the filesystem as the argument to du.
kdirstat.sourceforge.net/ Sep 1, 2006 – KDirStat is a graphical disk usage utility, very much like the Unix "du" ... While KDirStat is a KDE program, it runs fine on every X11 desktop,
It was in Mandriva, not too long ago but I don't see it now. Pretty cool gui du... Similar, still around:
Name : filelight Version : 4.6.5 Release : 2.2 Group : Graphical desktop/KDE Size : 523768 Architecture: x86_64 Source RPM : kdeutils4-4.6.5-2.2.src.rpm URL : http://utils.kde.org/projects/filelight/ Summary : Graphical disk usage statistics Description : Filelight allows you to quickly understand exactly where your diskspace is being used by graphically representing your file system as a set of concentric segmented-rings. You can use it to locate hotspots of disk usage and then manipulate those areas using a file manager.
Re: My Mandriva home is full!
Posted: 01 Mar 2012, 19:59
by viking60
rolf wrote:I think you must have already fixed it but, for the sake of tweaking, another strategy is 'du', with amendments:
I set head to 25 for the purposes of this thread - Viking, that code is right now.
It can be used, btw for whatever folder - /home/youruser, / (root), /var/log, whatever... All you need do is change the / in the link above to whatever folder you want to check out.
Was thinking I had it somewhere here at the forum. It will work now. I had forgotten the -n switch. As I said, I wasn't at my linux box when I initially posted it, so wasn't sure it was right.
Re: My Mandriva home is full!
Posted: 01 Mar 2012, 23:46
by viking60
Hmm there is a lot of stuff in my ~/tmp file. How about removing all of it?
Re: My Mandriva home is full!
Posted: 01 Mar 2012, 23:52
by dedanna1029
That works. I've done that before.
Re: My Mandriva home is full!
Posted: 02 Mar 2012, 00:01
by dedanna1029
However, for safety's sake, you may want to run ls -R on your /tmp and see if there's anything in it you want.
Re: My Mandriva home is full!
Posted: 02 Mar 2012, 00:16
by viking60
Ok done that leaving some files that looked important like easyurpmi.urpmi-media BTW your code above does not work so you might want to edit it. OK so far I have freed up 16 % by removing some isos and deleting stuff in tmp - moving on....
Re: My Mandriva home is full!
Posted: 02 Mar 2012, 03:22
by dedanna1029
See above edits.
As a rule of thumb, btw, I don't keep .isos - by the time you get to do a second burn on one, it's already had a new one released, so you just have to go download the new one anyway.
The code above, btw, can also be found in this thread, although yeah, rolf's is nice.
Re: My Mandriva home is full! Topic is solved
Posted: 02 Mar 2012, 16:20
by viking60
OK this is solved then thanks to your superduper tips. I used all of the tips above and I did install filelight, which is great. I also played around with
It turned out that my Virtualbox is clearly occuping the most space - and then I remembered that I had reserved a rather big HD in VirtualBox lately Nevertheless I managed to free up 30% of my home by removing useless stuff.
So a thread like this should be mandatory every 6 months
Re: My Mandriva home is full! [SOLVED]
Posted: 03 Mar 2013, 03:21
by dedanna1029
I had to come back here to grab the code I posted above, and noticed your df right above here. Viking, you had at the time, 118GBs left in /home. That may seem like a lot, but compared to the rest of your drive, I'd consider that still low. Is there anything else you can move to elsewhere? Anything? I myself don't call good until I have at least 50% free (really, 118GBs goes super fast).