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

2 points by oweiler ↗ HN
The title says it all. Why is the resulting status code 0?

$ cd / $ cd .. $ echo $? # is 0, but shouldn't that be 1?

2 comments

[ 2.8 ms ] story [ 14.7 ms ] thread
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.
Just like zero is the lowest number you can obtain in an unsigned number series.

0 -1 = 0;