TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

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

2 pointsby oweilerabout 2 years ago
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

josephcsibleabout 2 years ago
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 未加载