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

Martin martin at ml1.co.uk
Thu Jun 12 11:02:05 UTC 2014


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



More information about the Nottingham mailing list