how to change directory in Terminal (ex. cd System HD)

hi

how to change directory in Terminal (ex. cd System HD)
i wrote cd system hd, which did not work. Terminal understood it as cd system.
is there some character to write a "space" between words?

thanks 🙂

MacBook, Mac OS X (10.4.11)

Posted on Dec 2, 2007 4:32 PM

Reply
3 replies

Dec 2, 2007 4:43 PM in response to Yong Taek Hwang

You need to escape the spaces with a leading backslash or the shell will give you unexpected results.

For example to cd to "folder with spaces"

cd folder\ with\ spaces/

Also, the bash tab-auto-complete is your friend. Type a character or two and then tab, you'll get the idea when you see the result. If there is more than one possible completion, then hit tab a couple of times quickly and you'll get a list of all of the options.

hth

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to change directory in Terminal (ex. cd System HD)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.