[aklug] file protection trick

From: <bryanm@acsalaska.net>
Date: Sat Jun 18 2011 - 19:23:57 AKDT

As I keep a lot of stuff in ~, I'm susceptible to dangerous typos.
For example, a twitch of the thumb could turn:

$ rm junk*

into:

$ rm junk *

Something along these lines happened several years ago, and more
recently, I caught myself just before making a similar mistake.

Well, here's the solution:

$ touch AAA
$ chmod a-w AAA

As long as I don't use rm -f, a stray * parameter won't wipe out
my files before I have a chance to say no. I don't know why I
hadn't thought of it before!

--
Bryan Medsker
bryanm@acsalaska.net
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sat Jun 18 19:24:04 2011

This archive was generated by hypermail 2.1.8 : Sat Jun 18 2011 - 19:24:05 AKDT