"ls -l" output has changed

Asked by Mario Ramos

If I run ls -l on ubuntu 10.04 I get:

-rw-r--r-- 1 root root 152 2010-07-22 17:02 lsOutput

This is 8 Fields.

If I run the same command on any other distro, redhat, centos, debian...
Or even from Ubuntu's crontab the output will be:

-rw-r--r-- 1 root root 445 jul 22 17:50 lsOutput

This is 9 Fields.

I've searched on /etc/profile /etc/bash.bashrc ~/.bashrc ~/.profile,
I have checked and disabled aliases with "unalias -a", but still the output of the ls command is wrong and confusing my scripts.

Could anybody tell me how to get the normal ls output back?

Thank you.
Mario.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu coreutils Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Rijckenberg
Solved:
Last query:
Last reply:
Revision history for this message
Best Mark Rijckenberg (markrijckenberg) said :
#1

Use this command instead:

ls -l --time-style="+%b %_d %H:%M"

Or create new alias for this special command.

Revision history for this message
Mario Ramos (mario-hummy) said :
#2

Thanks.

Revision history for this message
Mario Ramos (mario-hummy) said :
#3

Thanks Mark Rijckenberg, that solved my question.

Revision history for this message
Ralph Corderoy (ralph-inputplus) said :
#4

ls(1) adapts to your locale. See the locale(1) command.

    $ >foo
    $ LC_TIME=en_GB.UTF-8 ls -l foo
    -rw-r--r-- 1 ralph ralph 0 2010-07-24 12:55 foo
    $ LC_TIME=C ls -l foo
    -rw-r--r-- 1 ralph ralph 0 Jul 24 12:55 foo

Revision history for this message
Mario Ramos (mario-hummy) said :
#5

This is exactly what I was looking for.

There had to be some env variable causing the problem.

Cheers.
Mario.

On 24 July 2010 13:56, Ralph Corderoy
<email address hidden>wrote:

> Your question #118608 on coreutils in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/coreutils/+question/118608
>
> Ralph Corderoy posted a new comment:
> ls(1) adapts to your locale. See the locale(1) command.
>
> $ >foo
> $ LC_TIME=en_GB.UTF-8 ls -l foo
> -rw-r--r-- 1 ralph ralph 0 2010-07-24 12:55 foo
> $ LC_TIME=C ls -l foo
> -rw-r--r-- 1 ralph ralph 0 Jul 24 12:55 foo
>
> You received this question notification because you are a direct
> subscriber of the question.
>

--
PS – Please help preserve the environment, don’t print this email unless you
have to.