<div dir="ltr">Well of course, you'd just recover from your most recent backup in that instant. All commands are safe if your important files are backed up regularly, and your unimportant ones occasionally.</div><div class="gmail_extra">
<br clear="all"><div><div dir="ltr"><div>Rory Holland <me@rory.sh><br></div>More contact info: <a href="http://rory.sh" target="_blank">http://rory.sh</a><br></div></div>
<br><br><div class="gmail_quote">On 12 June 2014 12:01, Martin <span dir="ltr"><<a href="mailto:martin@ml1.co.uk" target="_blank">martin@ml1.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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>
<span class="HOEnZb"><font color="#888888"><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>
</font></span></blockquote></div><br></div>