Subject: B19.1 bug: `du' miscounts disk usage and ignores .* files
From: [email-masked] (Lassi A. Tuura)

21 Sep 1998 10:30:09 -0700
Message-ID: <[email-masked]>
Reply-To: "Lassi A. Tuura" <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: [email-masked]

Hi,

`du' seems to be miscounting disk space by a factor of two on NT 4.0SP3
on a NTFS disk.  Actually, `du -h' *does* work, but both `-m' and `-k'
misreport the sizes:
  $ du -ks
  3337	.
  $ du -ms
  3	.
  $ du -hs
  6.3M	.

Another problem is that in its recursion, `du' skips directories that
start with `.' in their name, e.g. `.srt'.  It *does* include them in
the first level directory, e.g. in `.' if I invoke `du .'.  But it
misses them in all nested directories:
  $ du
  21	./.srt/i586-pc-cygwin32-winnt4.0/msvc++-5.0/.srtdb/deps
  16	./.srt/i586-pc-cygwin32-winnt4.0/msvc++-5.0/.srtdb/linksets
  16	./.srt/i586-pc-cygwin32-winnt4.0/msvc++-5.0/.srtdb/packages
  16	./.srt/i586-pc-cygwin32-winnt4.0/msvc++-5.0/.srtdb/rules
  87	./.srt/i586-pc-cygwin32-winnt4.0/msvc++-5.0/.srtdb
  1731	./.srt/i586-pc-cygwin32-winnt4.0/msvc++-5.0
  1731	./.srt/i586-pc-cygwin32-winnt4.0
  1732	./.srt
  4	./commons/config
  38	./commons
  0	./installed/com
  0	./installed/doc
  0	./installed/include
  0	./installed/info
  0	./installed/man
  5	./installed/share/DB/calib
  5	./installed/share/DB/default
  2	./installed/share/DB/filter
  22	./installed/share/DB/prod
  12	./installed/share/DB/temp
  45	./installed/share/DB
  10	./installed/share/job
  82	./installed/share
  0	./installed/var
  82	./installed
  2	./Tools/Age/src/AgeParser.dir/Templates
  2	./Tools/Age/src/AgeParser.dir
  0	./Tools/Age/src/libAge.dir
  1195	./Tools/Age/src
  1227	./Tools/Age
  56	./Tools/AgeToCxx
  101	./Tools/agetof
  33	./Tools/CSet
  1452	./Tools
  3337	.

  $ ls -laF Tools
  total 37
  dr-xr-xr-x  13 544      None            0 Aug 12 12:04 ./
  dr-xr-xr-x  11 544      None            0 Aug 12 12:02 ../
  dr-xr-xr-x   3 544      None            0 Aug 12 12:01 .srt/
  dr-xr-xr-x  11 544      None            0 Aug 12 12:05 Age/
  dr-xr-xr-x  13 544      None            0 Aug 12 12:07 AgeToCxx/
  dr-xr-xr-x  11 544      None            0 Aug 12 12:07 CSet/
  -r--r--r--   1 544      None          378 Aug 12 12:04 ChangeLog
  -r--r--r--   1 544      None          664 Aug 12 12:04 GNUmakefile.in
  -r--r--r--   1 544      None            8 Aug 12 12:04 PACKAGE
  -r--r--r--   1 544      None           38 Aug 12 12:04 VERSION
  dr-xr-xr-x  34 544      None            0 Aug 12 12:09 agetof/
  -r--r--r--   1 544      None        65477 Aug 12 12:04 configure
  -r--r--r--   1 544      None         2018 Aug 12 12:04 configure.in

Cheers,
//lat
--
With sufficient thrust, pigs fly just fine.  However, this is not
necessarily a good idea.  It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead.  --RFC1925, "The Twelve Networking Truths"

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".