How to CD to a Directory with Spaces in the Name (Bash)

To cd to a directory with spaces in the name, in Bash, you need to add a backslash (\) before the space. In other words, you need to escape the space.

So if you’re in the Library directory and need to go to a directory called Application Support, this is how you cd into it:

cd ~/Library/Application\ Support

Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊


Share & Discuss on