2 ms·
It's impossible because it simply calls chdir(2). The "current directory" is a property of a process; having it built-in means it changes the directory of the
by rleigh 11y ago
It's impossible because it simply calls chdir(2). The "current directory" is a property of a process; having it built-in means it changes the directory of the current process. If it was a separate executable, you'd change the directory in a separate child process for that executable, and the current directory of the shell would be unchanged, making it entirely useless.