Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a question about using the terminal in ubuntu 11.04.I have installed wine and steam and civ III thru steam.According to instructions on wine forum in order to play civ some font files need to be moved within the wine folder which i have done but it also informs to do the following:

then open a console and browse to:
.wine/dosdevices/c:/Program Files/Steam/steamapps/common/sid meier's civilization iii complete/Conquests/

and type the following command:
sudo chown root LSANS.*

when I open the terminal I am able to change directory to .wine/dosdevices/c but when I try to change to the next "program files" I get message in terminal not found. I type in ls command and does list "program files" why am I NOT able to change to directory "program files"

below is actual steps in terminal i have done

mike@ubuntu:~$ cd .wine
mike@ubuntu:~/.wine$ cd dosdevices
mike@ubuntu:~/.wine/dosdevices$ cd c:
mike@ubuntu:~/.wine/dosdevices/c:$ ls
Program Files  users  windows
mike@ubuntu:~/.wine/dosdevices/c:$ cd program files
bash: cd: program: No such file or directory

I also tried capitalize

share|improve this question

Arguments in the shell are are separated using spaces. This means that whenever you run a command and try to pass a file or a directory as an argument that contains a space in it, bash assumes it is two separate arguments. There are many ways to specify this. You can use what is called an escape character to signal that the space is part of the argument. To do this, just insert a \ before the space in the file name

cd Program\ Files

or you can use quotes to signal that it is a single parameter

cd "Program Files"

However, often you will not need to type the whole thing if you use the Tab Completion feature

cd P<TAB>

If there are multiple files starting with P, add another alphabet and press tab again to complete.

share|improve this answer

You need to quote any directory/file name which has spaces in, or it gets confused. Try this:

cd "Program Files"

Also, you can tab-complete, so you can also try:

cd "Progr<press TAB>

and it ought to fill the rest in for you.

share|improve this answer

First I want to say that I love the Command Line Interface (CLI) and there are a ton of free resources on it. As you dive into the directory and according to what you are getting stuck will want to type 'cd “Program Files” and then tap enter. You want to make sure that spelling is correct as the CLI sees files exactly how you type them. File1 is different from file1.

Someone mentioned the (TAB) key and this is awesome especially when you have a ton of info to type for a file name, etc.. Next time you're in the terminal and you've dug past the hidden wine folder try typing cd dos(then TAB). Chances are it will automatically fill in your dosdevices portion saving you valuable time.

A valuable CLI book for me is The Linux Command Line by William E. Shotts, Jr. and you can download the book for free!

share|improve this answer

As an add-on, if you want to access 'Program Files (x86)', use apostrophes for the special characters like this:

cd Program\ Files\ '('x86')'
share|improve this answer
Or just enclose the entire thing in double quotes. cd "Program Files (x86)" Shell variables are expanded in double quotes, so most filenames containing unescaped $ signs will do the wrong thing in double quotes, but for this and most situations, double quotes are the most elegant and least error-prone way to quote a string that contains spaces and parentheses (and even single quotes / apostrophes) but no double quotes. – Eliah Kagan Oct 11 '12 at 11:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.