As a moderator I have to consider how this question and answer might be cited as an example in the future by other people ("You said this was okay!", "You said I shouldn't flag these!") and in order to do that properly, we need to be specific about the type of danger being offered up:
Maliciously dangerous posts (eg something that tries to obfuscate an rm -rf /
) should be flagged as offensive if their intent is clearly to do harm.
Accidentally dangerous posts should be fixed. A lot of solutions could be dangerous or at least make things worse if they were incorrectly typed in. It's only likely that an error like that makes its way into an answer organically without intent.
Potentially dangerous posts are the most awkward ones to separate out. If the person throwing the answer into their terminal doesn't read around the answer or adapt it, they might be about to learn a hard lesson.
A number of commands that are potentially ruinous have trigger guards. rename
has a -n
flag, and you can comment out the -exec
or -delete
arguments on a find
example so that the user can confirm they're seeing the right files before batch operating on them.
So really past outright attacks, we're just about making posts as good as they can possibly be. A warning or a guard might be the ticket but they aren't requirements.
This is a significantly different topic to Help or advice on how to manage misleading/inappropriate answers to an asked question because that really deals with answers that are not answers. If you see something that is not an appropriate answer, flag away. If it's also dangerous, all the more reason to send it to oblivion.