How to cd to a directory that contains a space in its name?

Solution 1:

Either you put quotes around the directory name (cd "/Users/niho/Desktop/Reader 0.5") or you escape the directory name (/Users/niho/Desktop/Reader\ 0.5).

Solution 2:

You can escape the space:

cd /Users/niho/Desktop/Reader\ 0.5

Solution 3:

Fyi, using the Tab in bash shortcut would break at the first space it encounters if multiple directories have identical first names. In such cases a user would have to use:

cd Adobe\ Creative\ Cloud/

or what I prefer,

cd 'Adobe Creative Cloud'