ls -l date format - Ubuntu

This is a discussion on ls -l date format - Ubuntu ; The default "ls -l" date format used to be as follows: > -rw-r--r-- 1 root root 66292207 Apr 1 06:54 ubuntu-m04-Apr.tar.gz > -rw-r--r-- 1 root root 21846949 May 1 2007 ubuntu-m05-May.tar.gz Under Gutsy it changed to something else, but I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: ls -l date format

  1. ls -l date format

    The default "ls -l" date format used to be as follows:

    > -rw-r--r-- 1 root root 66292207 Apr 1 06:54 ubuntu-m04-Apr.tar.gz
    > -rw-r--r-- 1 root root 21846949 May 1 2007 ubuntu-m05-May.tar.gz


    Under Gutsy it changed to something else, but I could get it back using
    "ls -l --time-style=locale" or by using "export TIME_STYLE=locale".

    This doesn't work under Hardy.

    "man ls" says I can use --time-style=+FORMAT and if FORMAT is
    FORMAT1FORMAT2 it will do what I want.

    My question is: how do I insert a in the FORMAT string?

    I want something like:

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


    --
    Dean
    Los Angeles, CA, USA

  2. Re: ls -l date format

    Dean DeBruin wrote:
    > The default "ls -l" date format used to be as follows:
    >
    >> -rw-r--r-- 1 root root 66292207 Apr 1 06:54 ubuntu-m04-Apr.tar.gz
    >> -rw-r--r-- 1 root root 21846949 May 1 2007 ubuntu-m05-May.tar.gz

    >
    > Under Gutsy it changed to something else, but I could get it back using
    > "ls -l --time-style=locale" or by using "export TIME_STYLE=locale".
    >
    > This doesn't work under Hardy.
    >
    > "man ls" says I can use --time-style=+FORMAT and if FORMAT is
    > FORMAT1FORMAT2 it will do what I want.
    >
    > My question is: how do I insert a in the FORMAT string?
    >
    > I want something like:
    >
    >> ls -l --time-style="+%b %_d %Y%b %e %H:%M"


    OK. I got it to work by actually pressing Enter where the
    appears as follows:

    dean@ubuntu:~$ ls -l --time-style="+%b %_d %Y
    > %b %_d %H:%M"


    --
    Dean
    Los Angeles, CA, USA

  3. Re: ls -l date format

    > dean@ubuntu:~$ ls -l --time-style="+%b %_d %Y
    > > %b %_d %H:%M"

    >


    you could add an alias to this command in /etc/bash_bashrc(?).

    --
    @~@ Might, Courage, Vision, SINCERITY.
    / v \ Simplicity is Beauty! May the Force and Farce be with you!
    /( _ )\ (Xubuntu 7.10) Linux 2.6.25
    ^ ^ 22:31:01 up 5:53 0 users load average: 1.10 1.09 1.09
    (CSSA):
    http://www.swd.gov.hk/tc/index/site_...ub_addressesa/

  4. Re: ls -l date format

    On Ubuntu the ls -l defaults to using ls -l --time-style=locale which means that you might get strange results of the locales are not exactly the same. I found that a comparison of /var/lib/locales/supported.d/local and a 'dpkg-reconfigure locales' fixed my problems.
    ]

+ Reply to Thread