Skip to content

omnister/nrm

Repository files navigation

3/27/98

nrm: A New RM allowing file recovery and sequenced backup versions.

Released under GNU GPL.  If you make changes, or find bugs, please let
me know so I can fold them back into the main distribution.

Installation Hints:

Do a 'make clean' followed by a 'make'.

If everything proceeds without a problem, then 
do a 'make install' which will do the following:

	1) copy 'nrm' to /usr/local/bin/nrm
	2) copy 'urm' to /usr/local/bin/urm
	3) copy 'nrm.cleanup' to /etc/nrm.cleanup
	4) copy 'nrm.1' to /usr/local/man/man1/nrm.1
	5) copy and link 'ncp' 'nmv' to /usr/local/bin

Finally, you will need to manually add the following line to
root's crontab:

		30 1 * * *      /etc/nrm.cleanup      

This example will run the cleanup script every night at 1:30 AM.  The
cleanup script examines all ".gone" directories system wide and removes
any files with access dates older than 3 days.  Any empty .gone directories
are also deleted.

You can play with nrm by explicitly typing "nrm", but for long term
use I recommend creating a shell alias.  For example, in pdksh, I 
have the following lines in my .kshrc:

        if [ "`whence nrm`" != "" ] ; then
            alias rm=nrm
            alias cp=ncp
            alias mv=nmv
    	    alias RM='/bin/rm'
    	    alias CP='/bin/cp'
    	    alias MV='/bin/mv'
        fi

When I want to *really* remove something I either use the "RM" alias
or just type "\rm".  The backslash will prevent the alias from being
used, and the shell will look for a real program named rm, usually /bin/rm.

Ncp(1) and Nmv(1) are ksh scripts written by Ken Poulton
(poulton@opus.hpl.hp.com), and can be used as replacements for mv(1) and
cp(1) to protect the user from overwriting a target file. 

All the sources were edited using 4 character tabstops (in vi: set ts=4).
For distribution, tabstops have been converted into spaces using the
utility "expand -4".

The program 'gtime' is helpful if you want to look at filetimes.
It is invoked 'gtime -acm' and prints access, change and modify times.
If no flags specified, all times are printed.

--
Rick Walker
walker@opus.hpl.hp.com


About

A recoverable file delete and undelete program to replace /bin/rm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published