Ask HN: Why is CD.. in the root directory not an error? 2 points by oweiler 3y ago ↗ HN The title says it all. Why is the resulting status code 0?$ cd / $ cd .. $ echo $? # is 0, but shouldn't that be 1?
[–] josephcsible 3y ago ↗ 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. [–] simonblack 3y ago ↗ Just like zero is the lowest number you can obtain in an unsigned number series.0 -1 = 0;
[–] simonblack 3y ago ↗ Just like zero is the lowest number you can obtain in an unsigned number series.0 -1 = 0;
2 comments
[ 2.8 ms ] story [ 14.7 ms ] thread0 -1 = 0;