-   Linux - General (
-   -   Newb question (

zekko 08-22-2003 09:56 AM

Newb question
Hey, how do I cd to directories with spaces in them? I'm browsing my windows drive and I type:

[j@localhost windows]$ cd Program Files
bash: cd: Program: No such file or directory

I also tried Program%Files but it didn't work either.


sorrodos 08-22-2003 10:21 AM

Oh shoot, I used to remember how to do this... but now I am just lazy when using cd and use wildcards... so in your case I would just type something like:

cd Prog*

That will work as long as you don't have two directories that are spelled the same prior to the space and differently after...

ephem 08-22-2003 12:12 PM

try encapsulating the entire directory name within quotation marks..

cd "my directory"

pHoeNIgS 08-22-2003 05:01 PM

hmmm......good question :)

when you want to go to a directory with spaces, for example (c:\)Program Files,

cd /Program\ Files

i think it also works with question marks aso....

cd /mp3/band\-album

the backslash is the key :)

synecdoche 08-22-2003 05:26 PM

I always just put it in quotation marks. Seems easiest.


All times are GMT -5. The time now is 10:05 PM.