Linux install problems

Nathaniel W. Turner nturner-blu-discuss at houseofnate.net
Thu Nov 11 02:30:41 EST 2004


On Tuesday 09 November 2004 08:40 am, Jeff Kinz wrote:
> On Mon, Nov 08, 2004 at 10:03:13PM -0800, John J. Herda wrote:
> > 4. Of lesser importance, how do I get the date to display as
> > yyyy-mm-dd in file listings etc. as I can in Windows 98?
>
> Get the source code for the ls command and modify it.  There is no
> option (currently) for "ls" to display the date that way. (Unless its
> undocumented, a possibility)
> Or were you refering to one of the new GUI tools?  (And if so, which
> one?)

John,

Jeff is mistaken.  The ls command does indeed use YYYY-MM-DD style dates when 
you have the appropriate locale configured (as do many other commands):

nturner at codeine(~)$ locale
LANG=en_US.UTF-8
...
nturner at codeine(~)$ ls -l .bash_history
-rw-------  1 nturner nturner 10258 2004-11-11 01:22 .bash_history

On a Debian system one runs "dpkg-reconfigure locales" to choose which locales 
are are installed and which is the default.

You may already have a suitable locale installed; try this:
LANG=en_US ls -l
or
LANG=en_US.UTF-8 ls -l
and let us know if you have any luck.  (If one of those works for you, you 
will probably want to put the appropriate "LANG=..." line 
in /etc/environment.)

Cheers,
nate

-- 
Nathaniel W. Turner
http://www.houseofnate.net/
Tel: +1 508 579 1948 (mobile)



More information about the Discuss mailing list