[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Alternative to jdiskusage and xdiskusage?



On Mon, Nov 25, 2002 at 10:14:19AM +0100, Niclas Söderlund wrote:
| Hi,
| 
| I would love to see what's taking up my space on a few servers I run. In 
| more detail. The only problem for me is that I dont run X on them. Which 
| mean that neither jdisk or xdisk will work for me.

You don't have to run an X server on a machine to run X clients on it.
You can run any X app on the server as long as you set the DISPLAY to
a valid X server (ie the one on your workstation with the nice video
card and monitor).

| Any suggestions, or perhapse, someone way better than me on
| shellscripting and the tools needed for such a script (du, sort etc)
| have something already made up?

Nonetheless I tend to use
    $ du -sh .
to see how big a directory is or
    $ du -sh *
to see how big each file/directory in the current directory is.

If I want the listing in order of size, first I decide whether KB or
MB is a better unit of measure for these items.  Then I run either
    du -sk | sort -g
or
    du -sm | sort -g

The reason for using 'k' or 'm' instead of 'h' is to put all the sizes
in the same units so sort (which only parses the numeric part) will
order them correctly.  Otherwise 1M is less than 4K :-).

-D

-- 
Consider what God has done:
    Who can straighten what He has made crooked?
        Ecclesiastes 7:13
 
http://dman.ddts.net/~dman/

Attachment: pgp_16V5maExL.pgp
Description: PGP signature


Reply to: