[Nottingham] *nix most dangerous command line commands...
Peter Stokes
peter at ashlyn.co.uk
Thu Jun 12 11:13:39 UTC 2014
Hi All
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......
Thankfully the system was a workstation and not of vital use.....!
Peter
---------------------------
Peter Stokes
Tel: 01636 627990
Mbl: 07977 532320
---------------------------
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
More information about the Nottingham
mailing list