TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why is CD.. in the root directory not an error?

2 点作者 oweiler大约 2 年前
The title says it all. Why is the resulting status code 0?<p>$ cd &#x2F; $ cd .. $ echo $? # is 0, but shouldn&#x27;t that be 1?

1 comment

josephcsible大约 2 年前
If &quot;..&quot; didn&#x27;t exist in the root directory, then it would be an error. But it does exist, and it just points back at itself like &quot;.&quot; does.
评论 #34867102 未加载