delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/08/11:32:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 8 Aug 2002 11:32:24 -0400
From: Christopher Faylor <cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygwin and long filenames with spaces
Message-ID: <20020808153224.GC8388@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <MPG DOT 17bc7eb241ea128c989695 AT news DOT gmane DOT org> <Mahogany-0 DOT 64 DOT 2-2268-20020808-063814 DOT 00 AT MCHASE-COMPAQ> <20020808150914 DOT GE6833 AT redhat DOT com> <Mahogany-0 DOT 64 DOT 2-2268-20020808-081750 DOT 00 AT MCHASE-COMPAQ>
Mime-Version: 1.0
In-Reply-To: <Mahogany-0.64.2-2268-20020808-081750.00@MCHASE-COMPAQ>
User-Agent: Mutt/1.3.23.1i

On Thu, Aug 08, 2002 at 08:17:50AM -0700, Michael A Chase wrote:
>On Thu, 8 Aug 2002 11:09:14 -0400 Christopher Faylor <cygwin AT cygwin DOT com> wrote:
>>On Thu, Aug 08, 2002 at 06:38:14AM -0700, Michael A Chase wrote:
>>>On Thu, 8 Aug 2002 14:12:51 +0100 Chris Game <chrisgame AT bigfoot DOT com>
>>wrote:
>>>
>>>>How can you pass long filenames which include spaces to cygwin/bash
>>>>commands like 'ls' under MS-Windows?  Neither escaping the spaces, nor
>>>>enclosing the filename in single or double quotes seems to work.  I
>>>>have to use the old DOS style short filename like /cygdrive/Docume~
>>>>1/...  which can be a nuisance.
>>>
>>>Quoting the entire file specification or escaping the spaces with '\'
>>>are the normal ways that spaces in file or directory names are handled.
>>>Can you send us the exact sequence of commands you are trying that are
>>>not working as you expece?
>>
>>Quoting spaces with \ doesn't work from the command line on cygwin.
>>Quoting the entire specification does, e.g.
>>
>>ls -l "/cygdrive/c/Program Files"
>
>Both seem to work for me here at the bash prompt in a console window
>under WinXP.
>
>mchase AT MCHASE-COMPAQ /c/Documents and Settings/Michael A Chase $ ll
>Application\ Data/Comma\ Separated\ Values\ \(DOS\).ADR
>-rw-r--r--    1 mchase   None        38981 Jan 26  2002 Application Data/Comma Separated Values (DOS).ADR

You're doing it from bash.  I assumed that the person was having
problems from the command shell since they said "MS-Windows".  But,
on reflection, there is no guarantee that's the case here.  Not enough
info.

When there is a UNIX shell involved the quoting rules follow whatever
the UNIX shell uses (as you know).  When there is no UNIX shell involved
then cygwin itself tries to do something halfway intelligent with the
arguments.

Anyway, with luck, one of our responses should have answered the
question.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019