Disk space by filetype

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Apr 13 15:40:54 UTC 2006


On Wed, Apr 12, 2006 at 07:11:47PM -0400, Jason Spiro wrote:
> I often seem to fill up my hard drive to the max.
> 
> I have been wondering if it is practical to write a script to use UPX
> to pack the binaries and shared libraries of seldom-used applications
> (those whose last access time is long ago.) Or perhaps even strip
> them, though that makes GDB backtraces upon crashes quite useless.

Debian binaries (except -dbg/-dev files) are already stripped by policy.

> But first, I wonder: Is there an easy way for me find out what
> proportion of my disk is made of what sorts of files?

du -shx /usr/* /var/* /lib /root /home/*

That should give you a pretty good idea where the space is going.
/home, /usr/src and /usr/local are quite common, as is some places in
/var.

Do you ever run apt-get clean, to wipe out the download cache of
packages?  They can get pretty big if never cleaned out.

> This would allow me to answer such questions as: What proportion of my
> disk do binaries and libraries take up anyway? Text files? (For
> example, my /var/lib/dpkg/info directory takes up 28MB. Nothing there
> is compressed. Makes you wonder if whole-disk compressed file systems
> are worth it...) Could I have hundreds of megabytes of .o files left
> over from compiling things?

The stuff in /var/lib/dpkg is uncompressed since it runs scripts from
there, and the other stuff in /var/lib/dpkg is uncompressed because it
would be awful slow if it wasn't, and most people can spare 50 or 100M
of disk space these days without a second thought.

> I'm sure I could hack something up in perl, but if there was a nice
> graphical tool it'd be even better. I couldn't find anything in
> Debian's apt repository or on freshmeat. xdiskusage and kdirstat do
> not do this measurement. gdmap colorizes by filetype but does not have
> the summary reporting functionality I am looking for.

Go buy a new harddrive.  They are very cheap.  250GB drives are like
$110 now.

Everytime you do an upgrade, all your upx work would go to waste.

If you run out of space, either uninstall programs you don't use (you
are likely to have some), remove files you don't use (I know I have
plenty of those around), and/or get another bigger drive.  I use the
last option.  It is very efficient and saves time and frustration.

Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list