<p>For those not aware of it, "rm -I" gives a reasonable compromise between bare rm and "rm -i"</p>
<p>Cheers,</p>
<p>Roger</p>
<div class="gmail_quote">On Jun 14, 2014 11:59 AM, "Robert Mitchelmore" <<a href="mailto:psxrem@nottingham.ac.uk">psxrem@nottingham.ac.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is a terrible idea, but an entertaining one.<br>
<br>
$ mkdir foo<br>
$ cd foo<br>
$ touch -- -i<br>
$ touch importantstuff<br>
$ rm -rf *<br>
remove importantstuff? n<br>
$<br>
<br>
--<br>
<br>
Rob Mitchelmore<br>
Ph.D student and Man of Many Hats<br>
Horizon Doctoral Training Centre, University of Nottingham NG8 1BB<br>
<br>
<a href="http://jamesjoycewaskorean.com" target="_blank">http://jamesjoycewaskorean.com</a> | <a href="http://twitter.com/kerastion" target="_blank">http://twitter.com/kerastion</a><br>
<br>
<br>
________________________________________<br>
From: <a href="mailto:nottingham-bounces@mailman.lug.org.uk">nottingham-bounces@mailman.lug.org.uk</a> [<a href="mailto:nottingham-bounces@mailman.lug.org.uk">nottingham-bounces@mailman.lug.org.uk</a>] On Behalf Of RICHARD SMEDLEY [<a href="mailto:smedley358@btinternet.com">smedley358@btinternet.com</a>]<br>

Sent: 13 June 2014 17:05<br>
To: Notts GNU/Linux Users Group<br>
Subject: Re: [Nottingham] *nix most dangerous command line commands...<br>
<br>
> Many moons ago, I was on a customer site logged in<br>
> as root and mistyped the cd location I wanted to go<br>
> to, then not realising I was still in the / directory, I<br>
> then typed<br>
<br>
> rm -r *<br>
<br>
> End of operating system......<br>
<br>
<br>
The classic tale of recovering from this comes from Manchester:<br>
<a href="http://www.ee.ryerson.ca:8080/~elf/hack/recovery.html" target="_blank">http://www.ee.ryerson.ca:8080/~elf/hack/recovery.html</a><br>
<br>
 - Richard<br>
<br>
--<br>
@RichardSmedley<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 12 Jun 2014, at 12:01, Martin <<a href="mailto:martin@ml1.co.uk">martin@ml1.co.uk</a>> wrote:<br>
<br>
> OK folks,<br>
><br>
> I'll start the bits rolling with the question of how much damage can you<br>
> do to a Linux system as root with just one mistyped or missed character<br>
> on the command line?<br>
><br>
><br>
> My little gem for alarm is:<br>
><br>
> cat >>to_append_text_to_config_file<br>
><br>
> ...and using ">" create/overwrite rather than ">>" append...<br>
><br>
> !<br>
><br>
><br>
> Similarly, using "whatever_command 2>&1 | tee -a append_to_log_file" and<br>
> forgetting the "-a"...<br>
><br>
><br>
> Other good one's for "ouch" that others trip over?<br>
><br>
> Can commands be made 'defensively' 'safer'?<br>
><br>
> Cheers,<br>
> Martin<br>
><br>
> --<br>
> - ------------------ - ----------------------------------------<br>
> -    Martin Lomas    - OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7<br>
> - martin @ ml1 co uk - Import from   hkp://<a href="http://subkeys.pgp.net" target="_blank">subkeys.pgp.net</a>   or<br>
> - ------------------ - http:// ml1 .co .uk/martin_ml1_co_uk.gpg<br>
><br>
> _______________________________________________<br>
> Nottingham mailing list<br>
> <a href="mailto:Nottingham@mailman.lug.org.uk">Nottingham@mailman.lug.org.uk</a><br>
> <a href="https://mailman.lug.org.uk/mailman/listinfo/nottingham" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/nottingham</a><br>
<br>
<br>
_______________________________________________<br>
Nottingham mailing list<br>
<a href="mailto:Nottingham@mailman.lug.org.uk">Nottingham@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/nottingham" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/nottingham</a><br>
<br>
_______________________________________________<br>
Nottingham mailing list<br>
<a href="mailto:Nottingham@mailman.lug.org.uk">Nottingham@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/nottingham" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/nottingham</a><br>
This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<br>

<br>
This message has been checked for viruses but the contents of an attachment<br>
may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.<br>

<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Nottingham mailing list<br>
<a href="mailto:Nottingham@mailman.lug.org.uk">Nottingham@mailman.lug.org.uk</a><br>
<a href="https://mailman.lug.org.uk/mailman/listinfo/nottingham" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/nottingham</a><br>
</blockquote></div>