Subject: Re: bin/2893: Prettier df listings with long nfs mounts.
To: None <ragge@my40.sm.luth.se>
From: J.T. Conklin <jtc@NetBSD.ORG>
List: netbsd-bugs
Date: 10/29/1996 20:41:04
> >Description:
> When mounting nfs filesystems, the long pathnames causes df listings
> to look real ugly and are difficult to read. Example:
>
> my40:/usr/src/bin/df >df
> ftp.luth.se:/pub/FreeBSD/distfiles 1635228 1252988 382240 77% /mnt
>
> This looks nicer if the lines splits when long mounts (as SunOS):
>
> my40:/usr/src/bin/df >./df
> ftp.luth.se:/pub/FreeBSD/distfiles
> 1635228 1252988 382240 77% /mnt
This feature makes it difficult for simplistic scripts to trivially
tabulate data with awk or sed. However, this feature is present in
SunOS and GNU df, so there is a good chance that portable scripts
can handle this format.
Someone mentioned POSIX in this thread. POSIX specifies a -P flag for
a portable output format intended for use by scripts. Although our df
does not support that flag (yet), it's current output almost conforms.
(As far as I can tell, it's simply a matter of changing "1K-blocks" to
"1024-blocks").
Since there is (will be) a flag for portable output, and there is a
good chance that portable scripts already handle the "pretty" format,
I think a flag to enable the pretty format is probably not necessary.
I would support a change to make the pretty format the default.
--jtc