delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/07/07/17:07:28

X-Spam-Check-By: sourceware.org
Message-ID: <44AECD02.2090306@tlinx.org>
Date: Fri, 07 Jul 2006 14:07:14 -0700
From: Linda Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Using du.exe to calculate disk usage on a Microsoft cluster server
References: <00ec01c6a1dd$ab40c1b0$a501a8c0 AT CAM DOT ARTIMI DOT COM>
In-Reply-To: <00ec01c6a1dd$ab40c1b0$a501a8c0@CAM.ARTIMI.COM>
X-IsSubscribed: yes
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

Dave Korn wrote:
>   Still lacking in useful information.  You *still* haven't told us HOW on
> earth you managed to get impossibly long file names, you *still* haven't shown
> us the names of any directories that have failed.
---
	It is quite trivial.  He's prepending either "S:/" or
"/cygdrive/s" to an existing pathname.  The existing pathname can be at the
limit (~256 bytes).  Adding either prefix, above, the pathlen becomes 259 or
267 bytes, respectively.

	Another easy way: cd to directory "/averylongdirnamethathas200chars"
you can create a file in that directory of "maxchars", but when you try
to reference that file from anywhere other than the directory in which it is
located, you'll overflow the pathlen buffer.


>   The answer is the same as before, since you have supplied none of the
> further information which would have allowed a more detailed answer.  You
> might try using a mountpoint to shorten some of the prefix of the overly long
> filenames.  I *still* don't understand how it is possible for your users to
> create files with names that are longer than the maximum filename length that
> windows permits - this is a limitation of the windows OS and filing system,
> not one that cygwin imposes.
---
	A workaround might be using "Find" to find the directories, and execute
the "du -s *" in each directory, and pipe the output through a filter that
does a final concatenation of the current dir + pathname.
> 
>> 2. Has anyone else found a solution which will properly report the
>> amount of disk space a particular directory is occupying? 
---
	I don't think "du" will return the correct value for actual directories.
In other words, on linux, "mkdir t; touch t/a t/b t/c ... t/z" will create
a directory that takes up 4k, but on Windows it still claims it is taking 0k.

linda

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