TE
科技回声
首页
24小时热榜
最新
最佳
问答
展示
工作
中文
GitHub
Twitter
首页
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 / $ cd .. $ echo $? # is 0, but shouldn't that be 1?
1 comment
josephcsible
大约 2 年前
Collapse
If ".." didn't exist in the root directory, then it would be an error. But it does exist, and it just points back at itself like "." does.
评论 #34867102 未加载