5
命令的反斜杠前缀作用
source link: https://rabbit52.com/2019/12/command-with-prefix-backslash/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
命令的反斜杠前缀作用
看到这种类型的命令 \curl ...
于是研究了下,命令前面加反斜杠可以禁用 alias
比如你的 Shell 可能定义了 alias curl='curl -iL'
那么执行 \curl
的效果就是 curl
而没有 -iL
参数
或者你定义了另一个 alias customCmd='ls -lah'
那么执行 \customCmd
就会提示命令不存在
另外还有其他的方式禁用 alias
:
"curl"
'curl'
command curl
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK