Anna Syme

Click name ↑ to return to homepage

Mistakes and disasters

Accidently deleting something

rm myfile.txt

This removes the file. You can’t get it back.

Accidently deleting everything

This removes stuff in “mydir”:

rm -rf mydir/

But this removes stuff in the root directory (so, everything):

Don’t do this! :

rm -rf /

Accidently re-naming a file with an existing file’s name

mv myfile.txt importantfile.txt

This will re-name myfile.txt to importantfile.txt

BUT: if importantfile.txt already existed, it will now be gone.

An infinite loop in a script

while true
	echo now in loop
	sleep 1

This would be a bigger problem if, on each loop, output was created and stored.

Leaving a cloud instance running $$$

Learning the hard way