Comment on Hacking ls -lComments−pixelbeat13yI enable this for GNU ls like: alias ls="BLOCK_SIZE=\'1 ls --color=auto" The above is a bit hacky and not very UNIXy as it's lumping more logic into ls, rather than splitting out into functional units.Number formatting being a very common requirement, I've proposed a design for a new numfmt GNU coreutilhttp://lists.gnu.org/archive/html/coreutils/2012-02/msg00085...which would be used like: ls -l | numfmt --field=5 --format=%'d−Aardwolf13yI really don't understand why block size is 512 by default. It should really be 1 by default.Except for someone with an ancient hard disk who thinks in blocks instead of (mega, giga, etc...)bytes, who ever needs or wants that?−alayne13y512 byte blocks for ls is specified by POSIX. That would probably be a painful change now.−fafner13yWhy not alias ls="ls --block-size=\'1 --color=auto"
Comments
I enable this for GNU ls like:
The above is a bit hacky and not very UNIXy as it's lumping more logic into ls, rather than splitting out into functional units.Number formatting being a very common requirement, I've proposed a design for a new numfmt GNU coreutil
http://lists.gnu.org/archive/html/coreutils/2012-02/msg00085...
which would be used like:
I really don't understand why block size is 512 by default. It should really be 1 by default.
Except for someone with an ancient hard disk who thinks in blocks instead of (mega, giga, etc...)bytes, who ever needs or wants that?
512 byte blocks for ls is specified by POSIX. That would probably be a painful change now.
Why not