Skip to content

Comment on Hacking ls -l

Comments

FYI, there is no need to change GNU ls to get that behavior. You can make it use your locale's separator with either the --block-size="'1" option or by setting the LS_BLOCK_SIZE envvar to that same string:

    $ LC_ALL=en_US.UTF8 ls -og --block-size="'1" .
    -rw-------. 1 5,145,416 Oct  5 16:44 A
    -rw-------. 1 5,137,692 Oct  4 14:37 B
    -rw-------. 1 5,147,168 Oct  8 07:52 C
This feature is documented in the "Block size" section of the coreutils manual: i.e., you can type this to see it:
    info coreutils 'block size'
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.