// a non working attempt at cd // chdir() affects only this process and any it runs #include #include int main(int argc, char *argv[]) { if (argc > 1 && chdir(argv[1]) != 0) { perror("chdir"); return 1; } return 0; }