[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: #1303795 RFE: df output is non intuitive - multiple files residing i
From: |
Stephane Chazelas |
Subject: |
Re: #1303795 RFE: df output is non intuitive - multiple files residing in current directory |
Date: |
Thu, 4 Feb 2016 11:53:42 +0000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
2016-02-04 09:31:42 +0100, Bernhard Voelker:
[...]
> > I think df should provide an option to remove duplicates from output by
> > supporting --unique option like sort(1).
[...]
> I'm not too enthusiastic for such an option. This is the first time
> I've seen someone doing "df *". Although it doesn't seem to be explicitly
> specified by POSIX, I'd assume a consistent behavior like many other tools
> which do their job for each command line argument regardless whether it
> may make sense (stat, du) or maybe not (df, dirname).
Note that GNU du removes duplicates (which has been known to
surprise a few):
$ echo test > a
$ ln a b
$ ln -s a c
$ du a a b c
4 a
0 c
$ du -H a a b c
4 a
Not all implementations do that though (OS/X and Solaris, 2
certified Unices, don't, they don't deduplicate for df either).
--
Stephane