Benches macOS

4

how to change directory in Terminal (ex. …

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

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 🙂

4 replies

Sign in or join Beachball Help to reply.

  1. 0

    nerowolfe

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    As an aside, parenthesis also work when spaces are present.

    I do it using the wildcard *

    In your example, cd *fold (of course it has to be a unique folder/filename)

    That comes from years of Linux training and a strong dislike of typing.

  2. 0

    brainslice

    Imported from the Apple Support Forums via the Wayback Machine 🔗

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

    Yong Taek Hwang

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    thanks

    great help 🙂 !!!

  4. 0

    nerowolfe

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    As an aside, parenthesis also work when spaces are present.

    I do it using the wildcard *

    In your example, cd *fold (of course it has to be a unique folder/filename)

    That comes from years of Linux training and a strong dislike of typing.