linux: rmtil

Penguins signify Linux

I’m not a Linux guru by any means, but one of my favorite programs over the years has been joe, a text editor with an interface that is nearly-identical to Wordstar, the first word processing software I ever used. Joe makes handy little backup files whenever you edit a text document, named filename~, with the tilde character denoting that it is an old version. After a long day of wrenching away on code, this can result in a lot of clutter. For this reason, the sysadmins at my benevolent employer brewed up the following shell script ages ago:

#!/bin/sh
rm -fv *~
rm -fv .*~

They named it rmtil, and I’ve run it many hundreds of times over the years. Having just implemented it on my own server, I figured I’d put it somewhere others could benefit from it as well. Put it somewhere in your $PATH with execute and read permissions (chmod 755) and rejoice!

*edit (2007.05.10): Bosco wrote this version of rmtil as a Solaris-friendly modification of the original.