Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I determine how much HDD space my system is using?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Bob Leny
Apprentice
Apprentice


Joined: 18 Aug 2006
Posts: 189

PostPosted: Thu Jul 12, 2012 2:02 am    Post subject: How do I determine how much HDD space my system is using? Reply with quote

How do I determine how much HDD space my system is using?

I'm not quite certain how to do this on Gentoo KDE.

I tried df:
Code:

George bob # df -Th                                                                                                                                                                                                                         
Filesystem    Type    Size  Used Avail Use% Mounted on                                                                                                                                                                                       
rootfs      rootfs     99G   83G   12G  89% /                                                                                                                                                                                               
/dev/root     ext3     99G   83G   12G  89% /                                                                                                                                                                                               
rc-svcdir    tmpfs    1.0M   76K  948K   8% /lib64/rc/init.d                                                                                                                                                                                 
udev         tmpfs     10M  280K  9.8M   3% /dev                                                                                                                                                                                             
shm          tmpfs    4.0G     0  4.0G   0% /dev/shm


I'm pretty sure I'm not using 200GB. At this point I shouldn't have any multi media files on my system.

Is there a better way of doing this?

Thanks!
Back to top
View user's profile Send private message
steffie
n00b
n00b


Joined: 11 May 2012
Posts: 4

PostPosted: Thu Jul 12, 2012 2:10 am    Post subject: Reply with quote

/dev/root ext3 99G 83G 12G 89% /

you are using 83G........
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Thu Jul 12, 2012 4:10 am    Post subject: Reply with quote

After that, you can find where do you use a lot of stuff with that command :

Code:

# du -h /home | sort -h


For example
Back to top
View user's profile Send private message
Bob Leny
Apprentice
Apprentice


Joined: 18 Aug 2006
Posts: 189

PostPosted: Thu Jul 12, 2012 4:11 am    Post subject: Reply with quote

Ah, that makes sense, I don't know what I was thinking...

I found some more media files in my home directory.
/home/bob is no only 1GB, bringing the root partition down to 22GB used.

Still though, this seems like a lot.
It looks like /usr is about 16.4GB, /var is 2.7GB, and /sys is 1.5GB.

This seems like a lot to me. Why would they be so high?
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Thu Jul 12, 2012 4:35 am    Post subject: Reply with quote

I usually use du -xaB1m | awk '$1 >= 200'
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Bob Leny
Apprentice
Apprentice


Joined: 18 Aug 2006
Posts: 189

PostPosted: Thu Jul 12, 2012 4:52 am    Post subject: Reply with quote

Ooo, thanks for the fancy command, d2_racing. I just spent the better part of an hour trying to find it.

Using this new found ability, I did some more investigating:
Code:

7.8G    /usr/portage/distfiles
4.3G    /usr/share
2.3G    /usr/lib64
2.2G    /usr/share/doc
1.6G    /usr/src

924M    /var/tmp
1.1G    /var/log

1.5G    /sys/devices/pci0000:00


Is this about right? The reason I am asking is because I am thinking about switching to an SSD, and at about a $1 gig, I am trying to make sure I use the space wisely.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Thu Jul 12, 2012 7:19 am    Post subject: Reply with quote

Bob ...

/var/tmp looks like you have some builds that died, /var/tmp/portage can be cleared of such things. Also /usr/share/doc would seem to me to be fairly large (here its only 113MB). Running 'eclean-dist' might slim down /usr/portage/distfiles (here its 934M). Otherwise it looks ok.

My 'disk use':

Code:
du -h --max-depth=0 --exclude='.*' */ | sort -rh

HTH & best ...

khay
Back to top
View user's profile Send private message
broken_chaos
Guru
Guru


Joined: 18 Jan 2006
Posts: 370
Location: Ontario, Canada

PostPosted: Thu Jul 12, 2012 7:52 am    Post subject: Reply with quote

Bob Leny wrote:
Code:

2.2G    /usr/share/doc
1.6G    /usr/src

1.1G    /var/log

1.5G    /sys/devices/pci0000:00

How many packages do you have installed? The /usr/share/doc entry looks absurdly huge -- I'd look into what's contributing to this, in case you either have unnecessary packages installed or something that's gone awry with portage's compression of documentation.

The /usr/src entry looks like you may have a lot of old kernel sources/builds lying around. The older ones should be safe to remove with `emerge -av --depclean` and rm -rf on the remains.

The /var/log looks a bit on the large side, do you have logrotate installed? You may also have packages creating custom logfiles that aren't handled by logrotate that may need custom entries.

The /sys/devices entry is just plain weird to me (though I'm not intimately familiar with the inner workings of /sys). /sys is a psuedo-filesystem and likely isn't consuming any real space, though.
Back to top
View user's profile Send private message
Bob Leny
Apprentice
Apprentice


Joined: 18 Aug 2006
Posts: 189

PostPosted: Sun Jul 15, 2012 12:39 am    Post subject: Reply with quote

Thanks, that should be all I needed then.

It looks like will need to make sure I have a good 30GB for Gentoo on my new SSD...
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Sun Jul 15, 2012 5:18 pm    Post subject: Reply with quote

If you use a SSD for Gentoo, make sure that you use a tmpfs for your compilation(Use RAM instead of rw acces on your SSD).

http://en.gentoo-wiki.com/wiki/Portage_TMPDIR_on_tmpfs

It may save the life of your SSD :P
Back to top
View user's profile Send private message
Bob Leny
Apprentice
Apprentice


Joined: 18 Aug 2006
Posts: 189

PostPosted: Sun Jul 15, 2012 7:52 pm    Post subject: Reply with quote

Great tip, thanks! That seems pretty neat. I wonder if I can use this when I install Gentoo. Based on the one post, it can decrease compile times. Decreased compile times and an SSD, Gentoo should install in no time flat...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum