delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/07/26/12:53:23

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
From: ericblake AT comcast DOT net (Eric Blake)
To: Ken Dibble <kdibble AT alltel DOT net>, cygwin <cygwin AT cygwin DOT com>
Subject: Re: rm filename length problem
Date: Tue, 26 Jul 2005 16:52:57 +0000
Message-Id: <072620051652.23818.42E66A6900004D9300005D0A22007503300A050E040D0C079D0A@comcast.net>
X-Authenticated-Sender: ZXJpY2JsYWtlQGNvbWNhc3QubmV0

> I'm having a heck of a time with some long filenames.
> 
> kdibble AT BECCOMPUTER /cygdrive/c/Documents And Settings/Ken Dibble/Local 
> Settings/Temporary Internet Files/Content.IE5
> $ rm -Rf *
> rm: cannot remove 
> `450JUVMP/Type=click&FlightID=1991987&AdID=1986689&TargetID=2006165&Segments=200
> 1081,2001256,2001550,2001551,2001761,2001784,2001916,2002090,2002592,2003057,200
> 30[1]': 
> File name too long
> rm: cannot remove directory `450JUVMP': Directory not empty

Unfortunately, Internet Explorer has a habit of creating filenames that push
the limits of what the filesystem can handle.  The problem you are running
into is not a bug in rm, but a limitation of cygwin1.dll.  Dave's suggestion of
shortening the overall pathname by moving the containing directory is the
best approach I know of.  However be aware that the current cygwin
filename limitations are on the translated Windows version of the name,
so depending on where / is mounted it consumes more or less of the
filename buffer limit, not necessarily the length on the command line.

> FWIW, rsync complains about some filenames being too long as well.

Again, because it is not a bug in rsync, but a fundamental limitation in
cygwin/Windows.  You can also google this list to learn about attempts
to increase the filename length limitation in cygwin for NTFS by using
the alternate Windows API that has a more generous length limit (32k
instead of 256), but no one has yet contributed a complete patch that
does that job without breaking cygwin on Win9x or adding too much
overhead.

> 
> cygcheck attached.

You know, upgrading may help as well, as there was a patch in
cygwin-1.5.15 to increase PATH_MAX by one, which MIGHT have been
enough for your example (but no guarantees).  Currently, cygwin is at
1.5.18, bash at 3.0-8, and coreutils-5.3.0-9 replaces fileutils-4.1-2.

>     Cygwin DLL version info:
>         DLL version: 1.5.11
> bash                    2.05b-16           
> compface                1.4-5              
> cron                    3.0.1-12           
> fileutils               4.1-2              

--
Eric Blake
volunteer cygwin coreutils maintainer



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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