Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

"cd" into directory containg space in name [duplicate]

Writer Emily Wong

So I have been using Ubuntu for a few months now, and have come across a very noob terminal question.

I want to go from home -> Documents -> My Programs

I am able to get into my documents folder by doing

cd ./Documents

But when I want to go into "My Programs", I am unable to do so because of the space between "My" and "Programs". Is there a different syntax I must use to access this folder via terminal?

2

1 Answer

You can quote the whole directory name or escape the space in between the words.

In a nutshell, do any one of the following:

cd 'My Programs'
cd "My Programs"
cd My\ Programs