RichardNeill.org

Scripts and Source Code

Page not ready yet...Please nag me if you want something in particular.

cn - a trashCaN script

Introduction: How many times have you typed 'rm somefile', and then wished you hadn't? Do you want something more helpful than merely the advice to keep regular backups? cn is an alternative to rm, which you can use instead. Get into the habit of using cn everytime you would have used rm, and you'll be safe! This also is an improvement on having alias rm="rm -i", because then one gets complacent about using rm, but not all systems have this alias...

Features: cn is a well-commented bash shell script, so it's easy to understand and modify. cn is compatible with the (new) Freedesktop.org trash specification, so that files can be restored from the GUI; it also works with the older KDE and GNOME trash systems, or with a simple directory. cn prompts exactly once (by default), no matter how many files and directories you are deleting to the trash. It has a man page and makefile, and is GPL3-licensed.

Download: cn-1.21.tar.bz2, then untar, make, sudo make install. Invoke as cn and see man cn.