user3450695 user3450695 - 1 year ago 94
Linux Question

How to go to a directory whose file name has spaces between them in the linux terminal

I am trying to go to a directory whose file name has spaces between them in the linux terminal. I tried doing this:

cd Magical Island
bash: cd: Magical: No such file or directory


As you can see, it didn't work

How can I make it work? Thanks!

Answer Source

You need to quote the directory name:

cd 'Magical Island'

or escape the space character:

cd Magic\ Island

Have fun there!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download