2 ms·
Two pieces of advice: Read "horror stories", like a crazy bug introduced by an innocent commit, or how forgetting a single line of code can lead to a massive s
by nmc 13y ago
Two pieces of advice:
Read "horror stories", like a crazy bug introduced by an innocent commit, or how forgetting a single line of code can lead to a massive security breach. This will give you some "subconscious awareness" about the power of the tools you are using.
Pre-emptively prevent yourself from making mistakes. If you know you often misuse some command, just make it ask you for confirmation:
function confirm() {
echo -n "Continue? (Y/N) "
read YN
return $([ "$YN" = "Y" ])
}
alias rm="confirm&&rm"
You could even consider more elaborate checks, like GMail's "Mail Goggles" [1].
[1] http://gmailblog.blogspot.nl/2008/10/new-in-labs-stop-sending-mail-you-later.html http://gmailblog.blogspot.nl/2008/10/new-in-labs-stop-sendin...