X-Spam-Check-By: sourceware.org Date: Mon, 03 Jul 2006 10:24:46 -0400 From: Will Beldman Subject: RE: Using du.exe to calculate disk usage on a Microsoft cluster server To: cygwin AT cygwin DOT com Message-id: <44A928AE.1070805@bethel-crc.ca> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com > 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. >> 2. "File name too long" - Which it is, but I'd hope there is some way to >> get around this > Rename it. How did you get a filename that's longer than PATH_MAX? > That's not meant to even be possible! I don't own the files. One example is 259 characters long. They are caused by users who have chosen to name their files the same thing as the first sentence of their MS Word doc. >> 3. "du: fts_read failed: Permission denied" - That's the last error >> message I get. The program seems to crash at this point. > Probably perms again. Hard to know whether it's actually crashed or > is just > doing something with no visible output unless you actually debug it > > though. I am quite sure it crashes because I've printed the time after the script executes. Therefore du has exited somehow with that as the last error message I've received, and an incomplete listing was printed on STDOUT. -- 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/