I use Linux for 30 years. Never had this problem. However, I saw newbies, which copy paste commands from tutorials to shell and then frustrated, because # is a comment.
If this is a concern to mitigate, consider adding the following alias to your preferred shell profile:
alias rm='/bin/rm -I'
This will not conflict with scripts using PATH-relative 'rm' invocations, yet will provide the desired protection from erroneous interactive use of "rm -rf".See here[0] for details regarding the '-I' flag.
rm -rf * & cd; trn
Several hours later, around 3 AM, I was done reading netnews, so I exited trn. Then I remembered that there was one newsgroup I had forgotten to read, so I typed ↑↵ to run trn again, which had the effect of again running rm -rf * & cd; trn
but this time in my home directory. And of course my frantic ^C^C^C had no effect on the `rm`, which was safely in the background.Fortunately the computer center kept nightly backups.
rm /dir
Then go back and add the -rf.
Works on GNU and BSD. On GNU only you can
‘rm /dir -rf’