[nycbug-talk] Safety Expansion for FreeBSD rm(1)

Roland Dowdeswell elric at imrryr.org
Mon Oct 1 15:12:41 EDT 2007

On 1191253253 seconds since the Beginning of the UNIX epoch
Steven Kreuzer wrote:

>Basically, is a patch to rm that first reads ~/.rm before actually removing
>anything to make sure that what you are trying to delete isn't "protected"
>Example, if I did rm -rf ~ /bin (when I really wanted ~/bin) it would check
>to make sure that /bin and ~ are allowed to be removed.
>I am kinda on the fence about this, but think it could be a useful way to
>protect yourself from yourself
>Project Page: http://people.freebsd.org/~daichi/safety-rm/
>eMail thread on freebsd-current: http://marc.info/?l=freebsd-current&m=1190727
>What do you think?

You could just:

	$ chflags uchg file1 file2

to prevent file1 and file2 from being deleted.

    Roland Dowdeswell                      http://www.Imrryr.ORG/~elric/

More information about the talk mailing list