LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "cd" to a folder with spaces in it's name? (https://www.linuxquestions.org/questions/linux-newbie-8/cd-to-a-folder-with-spaces-in-its-name-221235/)

chri5 08-23-2004 05:55 AM

"cd" to a folder with spaces in it's name?
 
Hello,
I'm running redhat 9 and was wondering how do I cd to a folder if the folders name has spaces in it?

Say I've got a folder called "My Documents" how would I from the command line get to this folder?

If I type "cd My Documents" it tells me there is no such directory as "My"????

Sorry if this is a silly question but am I missing something here?

Cheers,
Chris.

druuna 08-23-2004 05:58 AM

Use double quotes around the directory:

cd "My Documents"

or escape the space:

cd My\ Documents

Hope this clears things up a bit

chri5 08-23-2004 06:05 AM

Thanks for the speedy response, it works!!!

Shantesh 08-23-2004 06:18 AM

also try pressing tab...it completes da foldername itself !!


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