Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jan 2000 10:29:48 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        Joerg Micheel <joerg@cs.waikato.ac.nz>
Cc:        current@FreeBSD.ORG
Subject:   Re: Additional option to ls -l for large files
Message-ID:  <00Jan13.102949est.40324@border.alcanet.com.au>
In-Reply-To: <20000113120018.H5228@cs.waikato.ac.nz>; from joerg@cs.waikato.ac.nz on Thu, Jan 13, 2000 at 09:54:17AM %2B1100
References:  <200001120201.SAA26378@gndrsh.dnsmgr.net> <v04210106b4a296b28cc2@[128.113.24.47]> <20000113120018.H5228@cs.waikato.ac.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-Jan-13 09:54:17 +1100, Joerg Micheel <joerg@cs.waikato.ac.nz> wrote:
>-rw-r--r--  1 gad  staff      1951k Dec 11 03:39 asciiedit.c
>-rw-r--r--  1 gad  staff    999123  Dec 11 03:39 asciisrch.c

You still need to mentally re-align the numbers before you can compare
the sizes.

>-rw-r--r--  1 gad  staff   1951k   Dec 11 03:39 asciiedit.c
>-rw-r--r--  1 gad  staff    999123 Dec 11 03:39 asciisrch.c

This reduces the number of significant figures to a level which
allows a quicker grasp of the size, but doesn't resolve the column-
width problem.

The other option would be to require a flag to ls to trigger the
behaviour - in which case all the files use the same suffix:

$ ls -l
-rw-r--r--  1 gad  staff   1951456 Dec 11 03:39 asciiedit.c
-rw-r--r--  1 gad  staff    999123 Dec 11 03:39 asciisrch.c
$ ls -lK
-rw-r--r--  1 gad  staff   1951k Dec 11 03:39 asciiedit.c
-rw-r--r--  1 gad  staff    999k Dec 11 03:39 asciisrch.c
$ ls -lM
-rw-r--r--  1 gad  staff   2M Dec 11 03:39 asciiedit.c
-rw-r--r--  1 gad  staff   1M Dec 11 03:39 asciisrch.c

Conveniently, -K, -M and -G are still available. Unfortunately, -T
and -P are taken (though -p isn't).  I'll stay out of the 2^x vs
10^y debate.

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00Jan13.102949est.40324>