[GTALUG] Man deletes his entire company
Alvin Starr
alvin at netvel.net
Fri Apr 15 13:44:28 EDT 2016
On 04/15/2016 01:09 PM, Scott Allen wrote:
> On 15 April 2016 at 12:47, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
>> This isn't true of the rm(1) command. No operand means delete nothing.
> The following article gives more specifics:
> <http://www.independent.co.uk/life-style/gadgets-and-tech/news/man-accidentally-deletes-his-entire-company-with-one-line-of-bad-code-a6984256.html>
>
> The script actually contained
> rm -rf {foo}/{bar}
>
> The error caused foo and bar to be null so the result was
> rm -rf /
>
The cyrus imap people came up with an elegant solution to people doing
this kind of thing to their mail accounts.
Expunging the contents of a mailbox will not actually remove the
contents till some number of days later.
There is something to be said for deletion to trash.
I wonder if anybody has hacked the unlink systemcall to provide a safe
delete.
Something like moving the files to something like a lost_and_found type
of directory where it can be cleaned out after some time period or based
on free space requirements.
As an aside there is an extundelete but I am not sure how well it works.
--
Alvin Starr || voice: (905)513-7688
Netvel Inc. || Cell: (416)806-0133
alvin at netvel.net ||
More information about the talk
mailing list