5

命令的反斜杠前缀作用

 2 years ago
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.
neoserver,ios ssh client

命令的反斜杠前缀作用

发表于

2019-12-16

|

更新于 2020-05-23

| 分类于 Devel

看到这种类型的命令 \curl ... 于是研究了下,命令前面加反斜杠可以禁用 alias

比如你的 Shell 可能定义了 alias curl='curl -iL' 那么执行 \curl 的效果就是 curl 而没有 -iL 参数

或者你定义了另一个 alias customCmd='ls -lah' 那么执行 \customCmd 就会提示命令不存在

另外还有其他的方式禁用 alias :

"curl"
'curl'
command curl

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK