Change directory command
Ok this should be an easy one but I can't figure it out. I have a directory called My Music (note the space). When I do a cd My Music, it says not found. How do I do a cd with a folder that has a space in the middle?
Thanks |
Use a \:
cd My\ Music |
or cd my then hit tab would either auto complete if there's only one starting like that, or a few tabs shows the different directories, which would have shown you My\ Music
|
Or just put the directory in quotes.
Code:
cd "My Music" |
Both single and double quotes can be used ... slightly different but nearly the same ... and the backslash "\" character is always recognized as an escape-character, nullifying any special meaning of the character (including a space) that immediately follows it.
Incidentally, the same tricks are used on the command-line in Windows. info bash is a very handy thing to read... lots of cool time-saving tricks in there. |
All times are GMT -5. The time now is 04:51 AM. |