[Gllug] Odd (but apparently correct) behaviour from du

Matt Blissett matt at blissett.me.uk
Thu Jul 17 18:31:57 UTC 2008

Nix wrote:

> On 17 Jul 2008, John Winters said:
>> Note that I'm not saying that du's behaviour is wrong - just it's not
>> obvious that it has to behave in this way *when invoked on separately
>> named directories*.
> That is bizarre and feels like a bug to me too. I'd ask on the coreutils
> list if I were you, and see what Jim Meyering says about this. (POSIX
> doesn't define the behaviour of du(1) with respect to files with
> i_nlink > 1 at all that I can see.)

It seems useful to me (at least, I've used it this way myself). If I have
three directories (A, B, C) of hard-linked backups, I can do
  du -hs A B C
and get
  100MB  A
  10MB   B
  20MB   C
which is more useful than
  100MB  A
  102MB  B
  101MB  C
since I can get that information anyway (with du -h A; du -h B; du -h C)


Gllug mailing list  -  Gllug at gllug.org.uk

More information about the GLLUG mailing list