From: jqb AT netcom DOT com (Jim Balter) Subject: Re: du does not find all directories 11 Feb 1997 01:40:03 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <33000592.559E.cygnus.gnu-win32@netcom.com> References: <199702101458 DOT IAA14225 AT krypton DOT anl DOT gov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (WinNT; I) Original-To: Ken Evans Original-CC: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com Ken Evans wrote: > > "JB" == Jim Balter writes: > > JB> I've also explained how you can fix du to not miss directories > JB> and to not divide the number of 1K blocks by 2. I've also > JB> explained that that still won't be sufficient because cygwin's > JB> st_blocks doesn't account for clustering. Are my postings not > JB> reaching your mailbox? > > Apparently, not all of them. About the only thing I've NOT heard > in this thread is how to make it work, the only thing I really wanted > to know. I sent you an email on 6Feb, cc'ed to the list, that said in part du uses inode numbers to detect links, so it will only count a file once. The cygwin implementation of inode numbers is bogus. You might want to build a version of du.c with the inode hashing commented out. > I've since written my own du, which does work. Perhaps you would like to share. > (And found > out that my drive is full, not because of excessive bytes in files, > but because of the whole-cluster allocations.) Told you so. :-) > Also, I just download the Cygnus GNU stuff, have not had time to > explore it, and don't know where to get the man pages that go with it. > I was under the impression that Sun 5 is reasonably POSIX compliant > and assumed the man pages there would be good enough. I would be the > first to read the man pages if I knew where they were. Sun 5 may be reasonably POSIX compliant, but GNU-win32/cygwin.dll is not. On top of that, the GNU utilities, even on systems where they work, are only POSIX-compliant if the POSIXLY_CORRECT environment variable is set, and in any case provide, as with most systems, a superset of POSIX capabilities ("POSIX" here refers to the POSIX.2 etc. drafts, not just the POSIX.1 standard). Most of the GNU utilities are documented via info files. You can find the du documentation in (relative to your cygwin installation directory) info/fileutils.info. Unfortunately, the info command has not been ported to gnu-win32, but you can read these files with any text reader and forgo the hypertext facilities, or view them under NTemacs (which is GNU emacs ported to Windows 95/NT, but not via gnu-win32). Or copy the files to any system with a GNU emacs and view them there. You can find documentation for the developer's tools (gcc etc.) at http://www.cygnus.com/pubs/gnupro/ and there's a link from there (GNU Online Documentation) to lots of info about info files, at http://www.cygnus.com/pubs/gnupro/1_getting_started/c_online_docs/GNUOnlineDocumentationOverview.html Additionally there are traditional man pages that are "obsolete" (from FSF/RMS's point of view) but mostly up to date. You can find these in the source distribution (make install doesn't work yet in gnu-win32 and the developers seem a bit parsimonious in terms of what they install). But there's no man command under gnu-win32, although there's been some discussion on the mailing list lately about how to produce one. > Du was the first program I ran from the distrubution. It clearly > was/is not an outstanding success. Perhaps you received the impression somewhere that gnu-win32 was POSIX compliant or fully functional. Just wait until you get to anything involving binary files. -- - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".