[Techtalk] what the heck is it with locale and ls -l

Carla Schroder carla at bratgrrl.com
Thu Feb 23 17:16:04 UTC 2012


On Thursday, February 23, 2012 07:10:26 AM Anthony de Boer wrote:
> Re: [Techtalk] what the heck is it with locale and ls -l
> From: Anthony de Boer <adb at adb.ca>
> To: techtalk at linuxchix.org
> 
> Carla Schroder wrote:
> > [carla at fedora etc]$ ls -l --time-style locale
> > -rw-r--r--. 1 root root 46 Jan 11 11:29 adjtime
> > -rw-r--r--. 1 root root 1518 Aug 16 2011 aliases
> >
> > 
> >
> > carla at mint /etc $ ls -l --time-style locale
> > -rw-r--r-- 1 root root 10 2012-02-17 17:16 adjtime
> > drwxr-xr-x 2 root root 4096 2011-10-12 08:11 akonadi
> >
> > 
> >
> > Both report the same locale-- en_US.UTF-8. So why does Fedora use the 
> > irritating date formatting where dates in the current year omit the
> > year? 
> The first example is the ancient and traditional way that ls has printed
> dates since the universe was a much much younger place.  Yes, it's a bit
> funky and old-fashioned, but many old-timers like myself are used to it
> by now.
> 
> IMHO the "irritating date formatting" is the new ISO stuff; getting that
> in one's face suddenly one morning because someone had a New And
> Innovative Better Idea can be a bit of a shock!


The first example is a stupid way of displaying dates because if you ever need 
a script to read ls -l output you have two different date outputs to handle. 
The joy of ISO 8601 is a standard method of handling date and time so you 
don't have to write long kludgy scripts. 

Carla
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Carla Schroder
ace Linux nerd
author of Linux Cookbook,
Linux Networking Cookbook,
Book of Audacity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the Techtalk mailing list