From: evans AT aps DOT anl DOT gov (Ken Evans) Subject: Re: du does not find all directories 8 Feb 1997 12:07:01 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199702081857.MAA13615.cygnus.gnu-win32@krypton.anl.gov> Original-To: jqb AT netcom DOT com Original-CC: MLDickey AT softart DOT com, sos AT prospect DOT com DOT ru, gnu-win32 AT cygnus DOT com, evans AT aps DOT anl DOT gov In-reply-to: <32FC4776.7BC7@netcom.com> (message from Jim Balter on Sat, 08 Feb 1997 01: 29:26 -0800) Original-Sender: owner-gnu-win32 AT cygnus DOT com "JB" == Jim Balter writes: JB> Note, though, that the cluster size has NOTHING WHATSOEVER to do JB> with the numbers reported by ls and du; under cygwin, they report JB> strictly based upon the file size, but they report half as many JB> blocks as they should. The fact that they don't know about JB> clusters makes them not very useful, even if they did report the JB> right numbers; if you have 1000 100 byte files on a 512M JB> partition, you are actually using 15.6M, but a "working" du would JB> think you are only using 500K. Now you know where your disk JB> space is going! If a 32:1 disk space usage for small files isn't JB> what you had in mind, consider switching to NTFS (or FAT32 if you JB> have it). There's even a freeware NTFS redirector that you can JB> run under Windows 95, though I haven't tried it and don't know JB> how reliable it is (it was created by reverse engineering NTFS, JB> the precise details of which seems to be on of those MS JB> "secrets", though there is a pointer to the redirector on one of JB> MS' own pages). My experience is that du reports in 2K blocks (based on comparison to ls and DOS dir), independently of -k. The number that appears seems to be half the number of kB. (Whether this is half as many as it "should" report depends on what you think it "should" report. The versions of du I use on Unix default to 512K blocks.) MORE IMPORTANTLY, du is not reporting all my directories. I get: du: 333347 -> 682,694,656 Bytes scandisk: 36,503,552 in 1,111 folders 17,760,256 in 225 hidden files 1,836,875,776 in 25,348 user files 255,328,256 available 2,146,467,840 total 32,768 in each allocation unit 65,505 allocation units tape backup: 1,210,603,864 (last time, approx. same files as now) The discrepancy between the tape backup number and scandisk is apparently the wasted space owing to allocation by cluster as mentioned above. Nevertheless, du is reporting roughly half as much as the tape backup. Even if you want to argue that the tape backup software is wrong, the du output clearly does not include all of the directories on the drive. It is missing whole directories. Hope this quantifies at least my own situation. Thanks for the interest, -Ken - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".