cd command?

owaters

Registered
How do I cd to a directory containing a space?
For example the 'iTunes Music' directory in '/Documents/iTunes'

I tried:

cd Documents/iTunes/iTunes Music/

but got the error:

cd: Too many arguments.
 
Originally posted by owaters
How do I cd to a directory containing a space?
For example the 'iTunes Music' directory in '/Documents/iTunes'

I tried:

cd Documents/iTunes/iTunes Music/

but got the error:

cd: Too many arguments.

Try cd Documents/iTunes/iTunes*
 
Originally posted by owaters
How do I cd to a directory containing a space?
For example the 'iTunes Music' directory in '/Documents/iTunes'

I tried:

cd Documents/iTunes/iTunes Music/

but got the error:

cd: Too many arguments.

I forgot another way

Try cd Documents/iTunes/iTunes\ Music

Trap the space with a "\" character. Type the \ then the space or whatever the meta character is. You can use this method to trap any meta charater in a file/directory name.

Meta characters are the top characteres on your numeric keys like the !, @ # $ %
 
Ooh looky! Here's another way! Put the whole thing in quotations marks, like so:

cd "Documents/iTunes/iTunes Music/"

Yiasou.
 
you can also use tabulator to complete names of directories, files...if there are many choices, it'll stop where similarities end....or if pressed twice in that case, show all possibilities
 
Back
Top