linux – bash中和有什么区别?

linux – bash中和有什么区别?,第1张

概述在zsh中,输入任意数量的斜杠会将我移动到根目录中,但正如我最近注意到的那样,在bash中你可以进入//并且它实际上显示//而不是/. 之后(///…/)这一切都以/结尾. 有人可以告诉我这个的区别/意义是什么? 见 Pathname resolution A pathname consisting of a single slash shall resolve to the root direc 在zsh中,输入任意数量的斜杠会将我移动到根目录中,但正如我最近注意到的那样,在bash中你可以进入//并且它实际上显示//而不是/.

之后(///…/)这一切都以/结尾.

有人可以告诉我这个的区别/意义是什么?

解决方法 见 Pathname resolution

A pathname consisting of a single slash shall resolve to the root directory of the process. A null pathname shall not be successfully resolved. A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner,although more than two leading slashes shall be treated as a single slash.

大多数实现只是将//视为/,但仍可能显示//.

总结

以上是内存溢出为你收集整理的linux – bash中/和//有什么区别?全部内容,希望文章能够帮你解决linux – bash中/和//有什么区别?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/yw/1035742.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存