This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Using du.exe to calculate disk usage on a Microsoft cluster server
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 7 Jul 2006 17:32:41 +0100
- Subject: RE: Using du.exe to calculate disk usage on a Microsoft cluster server
On 07 July 2006 17:03, Brian Dessent wrote:
> Dave Korn wrote:
>
>> 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.
>
> As far as I recall the PATH_MAX of 260 applies to the ANSI versions of
> the file APIs, but if you use the Unicode version you can create names
> up to 32K UTF-16 characters in length. So it is entirely possible to
> create a file with a name that is too long to access via normal programs
> that aren't using the Unicode variants of the API functions (which
> includes Cygwin.)
Ah, then one workaround would be to translate the paths into the
\\.\S:\blablabla native form, perhaps?
dk@rainbow /artimi/software/firmware> ls -la //./C:/
ls: //./C:/: No such host or network path
dk@rainbow /artimi/software/firmware> ls -la //./c:/
ls: //./c:/: No such host or network path
dk@rainbow /artimi/software/firmware> ls -la '\\.\c:\'
ls: \\.\c:\: No such file or directory
dk@rainbow /artimi/software/firmware> ls -la '\\.\c:\.'
ls: \\.\c:\.: No such file or directory
dk@rainbow /artimi/software/firmware> ls -la \\\\.\\c:\\
ls: \\.\c:\: No such file or directory
dk@rainbow /artimi/software/firmware> ls -la \\\\.\\C:\\
ls: \\.\C:\: No such file or directory
dk@rainbow /artimi/software/firmware>
Hmm, perhaps it wouldn't be. I can't seem to make it work any more. Doh.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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/