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: "Larry Hall (Cygwin)" <reply-to-list-only-lh at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Mon, 03 Jul 2006 20:10:11 -0400
- Subject: Re: Using du.exe to calculate disk usage on a Microsoft cluster server
- References: <44A928AE.1070805@bethel-crc.ca>
- Reply-to: cygwin at cygwin dot com
Will Beldman wrote:
> In reply to:
>> On 03 July 2006 14:50, Will Beldman wrote:
>>
>> I need to determine disk usage for each directory on a Microsoft
cluster
>> server. As a linux junkie, du is *the* tool for automating this kind of
>> stuff so I installed cygwin, mapped some drives and tried to schedule
>> the utility to run at night. However, I get a lot of errors thrown back
>> such as:
>> 1. "No such file or directory" - Which tends to appear on weird
>> filenames (like with spaces or ' or some other character) or when I
>> don't have permission to access the drive (but that's something I
can fix)
>Without seeing your script and knowing the dir names in question, it's
hard
> to say, but the obvious bet would be some kind of shell
quoting/escaping bug
> in the way you invoke 'du'.
Right, I was sure of this. But how would I make du properly escape? I'm
trying to run the utility on S:/*. I don't have a defined list of
directories to run against.
Use POSIX paths (i.e. /cygdrive/s). Here I think you've found an application
for 'find'. How about something like:
find /cygdrive/s -maxdepth 1 -print0 | xargs -0 du
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
216 Dalton Rd. (508) 893-9889 - FAX
Holliston, MA 01746
--
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/