delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <44A9B1E3.6030408@cygwin.com> |
Date: | Mon, 03 Jul 2006 20:10:11 -0400 |
From: | "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com> |
Reply-To: | cygwin AT cygwin DOT com |
User-Agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060112 Fedora/1.5-1.fc4.remi Thunderbird/1.5 Mnenhy/0.7.4.0 |
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: | <44A928AE DOT 1070805 AT bethel-crc DOT ca> |
In-Reply-To: | <44A928AE.1070805@bethel-crc.ca> |
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 |
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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |