This is gtk-du, v0.5, a utility that helps you to get an overview of the
sizes of directories and to clean them up by supplying a suitable GUI.

The latest version can be obtained from

	http://www.cs.purdue.edu/homes/lutterdc/software/index.html

What gtk-du is
--------------
gtk-du combines the functionality of the UNIX utilities du and rm and eases
the task of cleaning up directories.

I get really annoyed every time I have to clean up my directories, since I
find myself in the endless loop of du, rm, cd, du, rm, du ... Typically, I
du each directory several times, since I forgot how big things are in
there. 

To avoid this, gtk-du reads and caches the sizes of all directories
starting at a certain directory, displays them in a nice GUI and lets the
user navigate the directory tree with the mouse. The really courageous user
can even remove a whole directory and its subdirectories.

Installation
------------
gtk-du consists of the following files:

gtk-du.scm    - The main program 
gtk-utils.scm - Some functions and macros to make the use of GTK easier
README        - This file
COPYING       - The GNU General Public License

Put gtk-utils.scm somewhere on the %LOAD-PATH of guile and gtk-du somewhere
on your $PATH. Type
% gtk-du
and after a little delay you should see the main window.

Requirements
------------
In addition to the files that came with gtk-du, you need the following:
guile-core    
	A recent snapshot, I use guile-core-19980320. Can be obtained from 
	<http://www.red-bean.com/guile>

guile-scsh    
	I use guile-scsh-19980404 from the same address.

gtk+-1.0.0    
	The GTK+ Widget library from <http://www.gtk.org>

guile-gtk-0.9
	Marius Vollmer's latest version of the guile-gtk bindings. You can
	obtain it from <http://www.ping.de/sites/zagadka/guile-gtk>.

How to use gtk-du
-----------------
The GUI of gtk-du consists of a menu, a text entry field, a listbox and
some buttons at the bottom of the window.

After you start gtk-du, type the name of the directory you want to scan into
the text field labeld 'Directory' and press return. gtk-du will scan this
directory and all its subdirectories and display the results in the
listbox. 

You can navigate by clicking on a subdirectory in the listing. If the
subdirectory you selected has itself subdirectories (indicated by '...'
after the diectory name), clicking on the entry will show that
subdirectory's contents.
You get to the parent directory by pressing the 'Up' button. Pressing the
'Rescan' button rescans the tree starting at the current directory.
Pressing 'Quit' exits gtk-du.

The menu entries have the following functions:
File -> New Tree
	Tell gtk-du to throw away the current tree and start a new one.
	After you selected 'New Tree' you can enter any other 
	directory to scan.
File -> Quit
	Quit gtk-du.

Cleanup -> Remove
	Remove the current directory and all subdirectories.
	The current directory is the one shown in the 'Directory:'
	entry. If there is a subdirectory in the listbox selected, this is
	appended to the 'Directory' entry and constitutes the current
	directory. 
	This operation is equivalent to an rm -rf. If you don't know what
	that is, DON'T USE IT !!!

View -> Size 
	Which format to use for printing directory sizes
View -> Sort
	Sort filenames by Name or by Size

Options -> Count all
	Normally, the size of a file that has several hardlinks pointing to
	it is only counted the first time it is encountered. Subsequent
	files that share this dev/inode number are ignored.
	If 'Count all' is selected, these files are counted every time they
	are encountered.
Options -> Symlinks
	Symbolic links cause a bit of headache for du: they can create
	cycles in a directory tree or, if blindly followed, lead to gtk-du
	scanning an entire NFS-mounted network, which is certainly not what
	one wants.
	By default, symbolic links are never followed. Selecting 'same
	device' makes gtk-du to folow them if they stay within the current
	device. 'Same Owner' makes gtk-du follow symbolic links if the
	target of the link is owned by you. In any case, gtk-du is careful
	to avoid getting into cycles.

Bugs
----
(1) The directory sizes that are computed are not accurate to the last byte,
    but in the right ballpark. 
(2) The selection of an item in the listbox doesn't always reflect one's
    expectations. I don't quite understand the connection between the
    child-select signals and when GTK decides to render an item as
    selected. This is only important if one uses Cleanup->Remove. Check the
    confirmation dialog carefully !
 
Enhancements
------------
(1) Customizable 'Cleanup' menu. Some people might want to add a 'make clean'
    or 'rm *.aux *.log *.dvi' entry to the menu

(2) Present the directories in a spiffier way, e.g. a pie chart would be
    pretty cool.

(N) ???? Let me know

Contact info
------------
You can mail me any comments, suggestions and any other positive feedback
at lutter@cs.purdue.edu