0

New to terminal and having problems out of the gate. Using Terminal 2.1.2 on a Mac running 10.6.8. Using the "ls Documents" will list the contents, but when I try to change directories, which I tried several different ways, I get the following results:

new-host-2:~ MDimond$ cd.
-bash: cd.: command not found

new-host-2:~ MDimond$ cd./Users/MDimond/Documents
-bash: cd./Users/MDimond/Documents: No such file or directory

new-host-2:~ MDimond$ cd. /Documents
-bash: cd.: command not found

The /usr/bin has the cd command listed; the /bin does not.

1
  • 3
    try cd followed by space then the directory name. e.g. cd Documents
    – suspectus
    Jun 13, 2014 at 15:25

1 Answer 1

3

You typed cd. (with dot) instead of cd. Omit the dot (and the slash after it) and it should work.

2
  • 1
    PATH has nothing to do with this question. cd is a “built-in” (or “builtin”) command in the shell, i.e., it is not a program in /bin, /usr/bin, or any other directory (in contrast to programs like ls, cat, and pretty much anything else you use) – so the shell does not need to search to find cd. The water is muddied by the fact that some systems do have a /bin/cd or /usr/bin/cd, but those are red herrings – see Why is cd not a program?, Where is cd?, and related questions. Jun 13, 2014 at 21:06
  • 1
    @Scott I am on OS X, and there actually is a /usr/bin/cd, but you are right: When I call cd, the built-in command is used. I was unaware of the difference between built-in and external cd.
    – ben
    Jun 14, 2014 at 0:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .