TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
Ask HN: Why is CD.. in the root directory not an error?
2 points
by
oweiler
about 2 years ago
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
about 2 years ago
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 未加载