Change Directory

Eric Blake eblake@redhat.com
Mon Feb 24 15:08:00 GMT 2014


On 02/23/2014 03:40 PM, David Stacey wrote:
> On 23/02/14 22:27, Todd Poole wrote:
>> Getting confused on something. From bash terminal I can change
>> directory like so:
>>
>> $ cd /c/directoryname
>>
>> But if the directory has multi words it does not recognize the directory:
>>
>> $ cd /c/my directory name
>>
>> Is there a way to get cygwin to recognize multiple names in a directory?
> 
> Either surround the whole path in quotes, or use a backslash character
> '\' before each space:
> 
>     cd "/c/my directory name"
>     cd /c/my\ directory\ name

Or use zsh instead of bash (zsh auto-tries concatenating multi-argument
names into a single-argument directory containing spaces), or write a
bash function for cd that tries 'command cd "$*"' when $# > 1.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140224/b71e0354/attachment.sig>


More information about the Cygwin mailing list