[Nottingham] *nix most dangerous command line commands...

RICHARD SMEDLEY smedley358 at btinternet.com
Fri Jun 13 16:06:36 UTC 2014


> Many moons ago, I was on a customer site logged in
> as root and mistyped the cd location I wanted to go
> to, then not realising I was still in the / directory, I
> then typed 

> rm -r *

> End of operating system......


The classic tale of recovering from this comes from Manchester:
http://www.ee.ryerson.ca:8080/~elf/hack/recovery.html

 - Richard

--
@RichardSmedley












On 12 Jun 2014, at 12:01, Martin <martin at ml1.co.uk> wrote:

> OK folks,
> 
> I'll start the bits rolling with the question of how much damage can you
> do to a Linux system as root with just one mistyped or missed character
> on the command line?
> 
> 
> My little gem for alarm is:
> 
> cat >>to_append_text_to_config_file
> 
> ...and using ">" create/overwrite rather than ">>" append...
> 
> !
> 
> 
> Similarly, using "whatever_command 2>&1 | tee -a append_to_log_file" and
> forgetting the "-a"...
> 
> 
> Other good one's for "ouch" that others trip over?
> 
> Can commands be made 'defensively' 'safer'?
> 
> Cheers,
> Martin
> 
> -- 
> - ------------------ - ----------------------------------------
> -    Martin Lomas    - OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7
> - martin @ ml1 co uk - Import from   hkp://subkeys.pgp.net   or
> - ------------------ - http:// ml1 .co .uk/martin_ml1_co_uk.gpg
> 
> _______________________________________________
> Nottingham mailing list
> Nottingham at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/nottingham


_______________________________________________
Nottingham mailing list
Nottingham at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/nottingham



More information about the Nottingham mailing list