[Nottingham] *nix most dangerous command line commands...
Robert Mitchelmore
psxrem at nottingham.ac.uk
Sat Jun 14 10:59:35 UTC 2014
This is a terrible idea, but an entertaining one.
$ mkdir foo
$ cd foo
$ touch -- -i
$ touch importantstuff
$ rm -rf *
remove importantstuff? n
$
--
Rob Mitchelmore
Ph.D student and Man of Many Hats
Horizon Doctoral Training Centre, University of Nottingham NG8 1BB
http://jamesjoycewaskorean.com | http://twitter.com/kerastion
________________________________________
From: nottingham-bounces at mailman.lug.org.uk [nottingham-bounces at mailman.lug.org.uk] On Behalf Of RICHARD SMEDLEY [smedley358 at btinternet.com]
Sent: 13 June 2014 17:05
To: Notts GNU/Linux Users Group
Subject: Re: [Nottingham] *nix most dangerous command line commands...
> 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
_______________________________________________
Nottingham mailing list
Nottingham at mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/nottingham
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.
This message has been checked for viruses but the contents of an attachment
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.
More information about the Nottingham
mailing list