www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/02/24/16:27:17

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,MISSING_HEADERS,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
Date: Tue, 24 Feb 2009 15:27:03 -0600 (CST)
From: Tim McDaniel <tmcd AT panix DOT com>
cc: Cygwin mailing list <cygwin AT cygwin DOT com>
Subject: Re: file name too long
In-Reply-To: <37bd06460902241224p2b44d828id6e15d4c4cc453b8@mail.gmail.com>
Message-ID: <Pine.NEB.4.64.0902241516140.720@panix3.panix.com>
References: <37bd06460902141000s4c1adfa8gb7c0ab135be210f9 AT mail DOT gmail DOT com> <37bd06460902241224p2b44d828id6e15d4c4cc453b8 AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Tue, 24 Feb 2009, Paul Cantalupo <hey, I remembers to expunge
this!> wrote:
> tar: S1172_Spanish_Protin_Total_Nucleic_Acid/S1172_Spanish_Protin_Total_Nucleic_Acid.fa.cdhit_out.masked.goodSeq_HGblast/S1172_Spanish_Protin_Total_Nucleic_Acid.fa.cdhit_out.masked.goodSeq_file7.HGblast.out:
> Cannot open: File name too long
>
> This name is only 201 chars long; I thought Windows max file length
> was 255.

I have a vague memory that the limit includes the current directory
path.  Anyone else know whether that's true or not?

What's the current directory name when running that?  If you add the
length of the current directory name, plus one for the "/" separator,
plus the length of the path above, is it more than 254?

> Is there a workaround to this problem other than installing Linux?

When the problem can be helped with a shorter directory name, I use
the subst Windows command to map the directory to a drive letter.
That shortens the directory name from whatever to 2.  For example, M:
is one letter that I leave unused, and /mnt is my value instead of
/cygdrive.  So, as an untested example from Windows Server 2003:

     /mnt/c/WINDOWS/system32/subst M: 'c:\long\path name\goes  here'
     pushd /mnt/m
     [do my work here]
     popd
     /mnt/c/WINDOWS/system32/subst M: /d    # unmap the drive letter

-- 
Tim McDaniel, tmcd AT panix DOT com

--
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