在.bashrc别名示例之前我有一条评论:
# Some example alias instructions
# If these are enabled they will be used instead of any instructions
# they may mask. For example, alias rm='rm -i' will mask the rm
# application. To override the alias instruction use a \ before, ie
# \rm will call the real rm not the alias.
“bash Cookbook”也谈到了这种运行真实程序的方式,而不是别名。
但在man bash这方面清楚地(具体地)没有说。我发现的只是“不带引号的反斜杠 '\' 是 Bash 转义字符。它保留了下一个字符的文字值,但换行符除外。”
存储单个字符的字面含义如何禁用别名的使用?
以下是关键建议:
\rm, 以及"rm"or"r"m, 被部分转义。因此,不会发生在alias'ov 中的搜索。也可以看看:https://stackoverflow.com/a/16506263/1892060
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_03_01