Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'll repeat this here:

  export TIME_STYLE=long-iso
  export BLOCK_SIZE="'1"
The first option gives ISO dates, the second the thousands separator. You need a locale for a thousands separator, en_GB here:

  $ ls -on i*
  -rw-rw-r-- 1 1001     1,335 2017-06-16 14:31 icon-shelters.svg
  -rw-r--r-- 1 1001 1,633,946 2016-11-07 14:50 insects.png
  -rw-r--r-- 1 1001 1,445,837 2016-11-18 10:32 ix
Block size: https://www.gnu.org/software/coreutils/manual/html_node/Bloc...

Time style: https://www.gnu.org/software/coreutils/manual/html_node/Form...



Thank you! I couldn't live without the alias I use for ls, which specifies BLOCKSIZE with the tick. Now I am going to add TIME_STYLE, which I didn't know about but I love already.

The rendering of time in any format other than ISO-8601 is a pet peeve of mine. It always baffles me why people do it.


Sadly not supported by BSD ls.


True, but if you "pkg install gnuls" and set up an alias, you can get gnu ls transparently.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: