[plug] I hate myself :( rm -r gone too far....

Brian Tombleson brian at paradigmit.com.au
Thu Aug 22 12:59:18 WST 2002


> I wanted to destroy a no longer needed configuration
> directory /usr/local/etc/ .  A careless moment of stupidity caused me
> to do this:
> localhost:/usr/local# rm -r /etc

Think about adding the line :
  alias rm='rm -i'
to you /etc/profile file.

> My question is after I unpack etc.tgz, how can I work out the
> differences between the files in the two directories so that I know
> which files need to be replaced?

You might want to try rsync(1) to get the bulk of it back (ie, files that
are missing).

Or maybe .. rsync your current /etc dir into the unpacked backup - which
should update files that have been modified and that you still have, then mv
the whole lot back to /etc to override the partial set of files you have
there.

There's probably a better way, but this is at least one option.

HTH
- Brian.




More information about the plug mailing list