Live data from Hacker News

How does `cd` work?

blog.safia.rocks

91–93 of 93 posts

Re: How does `cd` work?

#91
post #60

Earlier quoted context omitted.

Everybody who comes to know about systems calls will have learned the concept for the first time. Some people come to that knowledge by becoming a web developer, gaining some rudimentary understanding of the command line, typing `which cd`, and eventually reading the bash source. The fact that this is even possible is a testament to the author's curiosity and the value of free software. Others come to that knowledge…

I think gp is not ragging on the blog's author for being a novice at Unix systems internals but lamenting the " I looked into this but then it all seemed so complicated so I stopped" attitude that is present in this as well as the sibling posts on sudo and ls. I would much prefer to read three posts delving deeper into the inner workings of any one of these commands than the existing three muddled surface level treat…

I suggest a question and answer WWW site.

* https://unix.stackexchange.com/a/413225/5132

* https://unix.stackexchange.com/a/251215/5132

* https://superuser.com/a/380231/38062

* https://unix.stackexchange.com/a/34386/5132

... and so on.

Re: How does `cd` work?

#92
post #73

Earlier quoted context omitted.

It's been like that since the DOS days, IIRC. You can simulate that behavior on bash with an alias such as this one: alias cd..="cd .."

I believe that you also don't need the space when you specify a path: cd\foo\x The cmd parser in Windows is the most bizarre piece of software in common use. I don't believe there is a single person that actually understands how it works completely.

cool

Re: How does `cd` work?

#93
post #90
post #68

Okay, but now I want to know how it works on something other than (foo)Nix, because that's not an OS space I care about. What about how it works in CP/M or foo-DOS? I've never used a *Nix computer, but I know that I used 'cd' going back to the time of using a TRS-80 CoCo. I know it's a low-level system call in most on-disk operating systems to change directories. But, for instance, how does it translate physical addr…

What you want is a question and answer WWW site. * https://superuser.com/a/380231/38062 * https://unix.stackexchange.com/a/251215/5132 ... and so on.

I appreciate the information honestly, but I meant it mostly in the sense that those would be some of the things I'd expect to see in a "how does 'cd' work?" post.
Post reply on HN