Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Best reply

Posted on Dec 2, 2007 4:43 PM

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
3 replies
Question marked as Best reply

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

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 ID.