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