Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

cd

because I never had to lookup how to use it

EDIT: hm it doesn't even have a man/info page. Where can you learn about "cd" or "cd -", then?!



`cd` is not a command; it is built into your shell.

Some systems, like OS X and CentOS, map the cd man page to builtin which lists all the shell builtins and lets you know you should look at your shell's man page.


Try `type cd` and you will see it is a shell builtin. In bash at least you can see the help via `help cd`.

See 1.4.1.7 here for how bash searches for commands: http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_01_04...


> hm it doesn't even have a man/info page.

It does on Unix and BSD systems.


cd has at least two man pages on Fedora 27: BASH_BUILTINS(1) and CD(1P) from POSIX Programmer's Manual.


In bash at least, run `help cd`


man sh




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: