litetrash: a light trash can for (at least some) UNIX systems
---------

v1.0 (22/03/2005)

Written by Manuel Arriaga [see bottom of file for contact information]

Copyright (C) 2005 Manuel Arriaga 
Licensed under the GNU General Public License version 2.  
See the file COPYING for details.


What is litetrash?
------------------

A light-weight trash can which is known to run on GNU/Linux and Solaris.

If you are a GNU/Linux user and need more configuration options, check out
libtrash [http://home.nyu.edu/~mad438/software/libtrash].


Installation:
-------------

0. Before anything else:

- Start by reading the README.1ST file.

- After having done so, edit the "Configuration" section at the top of the
litetrash.c file. 

1. Compile with

make

2.

Place the resulting file, called litetrash.so, somewhere good. When doing a
system-wide installation on GNU/Linux /usr/local/lib is probably a good
candidate. On the other hand, if you are on Solaris you might consider
putting it in /usr/lib/secure or /lib/secure instead so that running secure
processes while litetrash is active won't generate warnings about an
"illegal insecure pathname"."

3.

Point the LD_PRELOAD environment variable to the litetrash.so file. E.g., a
bash user might append the following line to his/her ~/.profile:

export LD_PRELOAD=/usr/local/lib/litetrash.so

Of course, the path must reflect the actual location of the file.

[When doing a system-wide installation on GNU/Linux, you can alternatively
just add the path to litetrash.so to the file /etc/ld.so.preload.]


Usage:
------

You can control the behavior of litetrash at run-time by setting two
environment variables. Their default names are TRASH_OFF and UNCOVER,
although -- if you made changes to the top of the litetrash.c file before
compiling -- they might have different names on your system.

TRASH_OFF simply disables litetrash: any file removals will be final.

UNCOVER, on the other hand, allows you to specify the name of a directory
(either as an absolute path or as a path relative to the current working
dir) under which all files (including those residing in its subdirectories)
will be unprotected.

The root user who performed a system-wide installation of lite-trash will,
in most cases, wish to set UNCOVER="/" in his/her shell start-up script.

Bugs, feedback, praise:
----------------------

Email me at the concatenation of my first and last names followed by at
gmail . com.
