linux – bash中/和//有什么区别?

前端之家收集整理的这篇文章主要介绍了linux – bash中/和//有什么区别?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
在zsh中,输入任意数量的斜杠会将我移动到根目录中,但正如我最近注意到的那样,在bash中你可以进入//并且它实际上显示//而不是/.

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

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

解决方法

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.@H_403_3@

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

猜你在找的Linux相关文章