ls -l date format? - Ubuntu

This is a discussion on ls -l date format? - Ubuntu ; ls -l used to list files with the dates formated as follows: drwxr-xr-x 2 root root 4096 Jun 20 2006 last-full drwx------ 2 root root 16384 Feb 11 2006 lost+found -rw-r--r-- 1 root root 28122122 Dec 30 05:38 ubuntu-d0-Sun.tar.gz -rw-r--r-- ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: ls -l date format?

  1. ls -l date format?

    ls -l used to list files with the dates formated as follows:

    drwxr-xr-x 2 root root 4096 Jun 20 2006 last-full
    drwx------ 2 root root 16384 Feb 11 2006 lost+found
    -rw-r--r-- 1 root root 28122122 Dec 30 05:38 ubuntu-d0-Sun.tar.gz
    -rw-r--r-- 1 root root 740535 Dec 24 05:30 ubuntu-d1-Mon.tar.gz
    -rw-r--r-- 1 root root 744160 Dec 25 07:01 ubuntu-d2-Tue.tar.gz
    -rw-r--r-- 1 root root 6378002 Dec 26 06:09 ubuntu-d3-Wed.tar.gz
    -rw-r--r-- 1 root root 6701651 Dec 27 06:12 ubuntu-d4-Thu.tar.gz
    -rw-r--r-- 1 root root 6689369 Dec 28 06:50 ubuntu-d5-Fri.tar.gz
    -rw-r--r-- 1 root root 6687496 Dec 29 05:02 ubuntu-d6-Sat.tar.gz
    -rw-r--r-- 1 root root 0 Jan 1 2007 ubuntu-m01-Jan.tar.gz
    -rw-r--r-- 1 root root 0 Feb 1 2007 ubuntu-m02-Feb.tar.gz
    -rw-r--r-- 1 root root 0 Mar 1 2007 ubuntu-m03-Mar.tar.gz
    -rw-r--r-- 1 root root 7201357 Apr 1 2007 ubuntu-m04-Apr.tar.gz
    -rw-r--r-- 1 root root 21846949 May 1 2007 ubuntu-m05-May.tar.gz
    -rw-r--r-- 1 root root 25770687 Jun 1 2007 ubuntu-m06-Jun.tar.gz
    -rw-r--r-- 1 root root 25853647 Jul 1 05:50 ubuntu-m07-Jul.tar.gz
    -rw-r--r-- 1 root root 26912375 Aug 1 07:12 ubuntu-m08-Aug.tar.gz
    -rw-r--r-- 1 root root 28553373 Sep 1 05:21 ubuntu-m09-Sep.tar.gz
    -rw-r--r-- 1 root root 30212944 Oct 1 04:32 ubuntu-m10-Oct.tar.gz
    -rw-r--r-- 1 root root 42193964 Nov 1 06:28 ubuntu-m11-Nov.tar.gz
    -rw-r--r-- 1 root root 13495163 Dec 1 06:21 ubuntu-m12-Dec.tar.gz

    Now it lists files with the dates formatted as follows:

    drwxr-xr-x 2 root root 4096 2006-06-20 20:44 last-full
    drwx------ 2 root root 16384 2006-02-11 18:47 lost+found
    -rw-r--r-- 1 root root 28122122 2007-12-30 05:38 ubuntu-d0-Sun.tar.gz
    -rw-r--r-- 1 root root 3202388 2007-12-31 05:51 ubuntu-d1-Mon.tar.gz
    -rw-r--r-- 1 root root 17084416 2008-01-01 06:42 ubuntu-d2-Tue.tar.gz
    -rw-r--r-- 1 root root 6378002 2007-12-26 06:09 ubuntu-d3-Wed.tar.gz
    -rw-r--r-- 1 root root 6701651 2007-12-27 06:12 ubuntu-d4-Thu.tar.gz
    -rw-r--r-- 1 root root 6689369 2007-12-28 06:50 ubuntu-d5-Fri.tar.gz
    -rw-r--r-- 1 root root 6687496 2007-12-29 05:02 ubuntu-d6-Sat.tar.gz
    -rw-r--r-- 1 root root 37497747 2008-01-01 05:58 ubuntu-m01-Jan.tar.gz
    -rw-r--r-- 1 root root 0 2007-02-01 00:00 ubuntu-m02-Feb.tar.gz
    -rw-r--r-- 1 root root 0 2007-03-01 00:00 ubuntu-m03-Mar.tar.gz
    -rw-r--r-- 1 root root 7201357 2007-04-01 05:52 ubuntu-m04-Apr.tar.gz
    -rw-r--r-- 1 root root 21846949 2007-05-01 04:36 ubuntu-m05-May.tar.gz
    -rw-r--r-- 1 root root 25770687 2007-06-01 19:34 ubuntu-m06-Jun.tar.gz
    -rw-r--r-- 1 root root 25853647 2007-07-01 05:50 ubuntu-m07-Jul.tar.gz
    -rw-r--r-- 1 root root 26912375 2007-08-01 07:12 ubuntu-m08-Aug.tar.gz
    -rw-r--r-- 1 root root 28553373 2007-09-01 05:21 ubuntu-m09-Sep.tar.gz
    -rw-r--r-- 1 root root 30212944 2007-10-01 04:32 ubuntu-m10-Oct.tar.gz
    -rw-r--r-- 1 root root 42193964 2007-11-01 06:28 ubuntu-m11-Nov.tar.gz
    -rw-r--r-- 1 root root 13495163 2007-12-01 06:21 ubuntu-m12-Dec.tar.gz

    What changed and how do I get it back to the old style?

    --
    Dean

  2. Re: ls -l date format?

    Dean DeBruin wrote:
    > ls -l used to list files with the dates formated as follows:
    >
    > drwxr-xr-x 2 root root 4096 Jun 20 2006 last-full
    > drwx------ 2 root root 16384 Feb 11 2006 lost+found
    > -rw-r--r-- 1 root root 28122122 Dec 30 05:38 ubuntu-d0-Sun.tar.gz
    > -rw-r--r-- 1 root root 740535 Dec 24 05:30 ubuntu-d1-Mon.tar.gz
    > -rw-r--r-- 1 root root 744160 Dec 25 07:01 ubuntu-d2-Tue.tar.gz
    > -rw-r--r-- 1 root root 6378002 Dec 26 06:09 ubuntu-d3-Wed.tar.gz
    > -rw-r--r-- 1 root root 6701651 Dec 27 06:12 ubuntu-d4-Thu.tar.gz
    > -rw-r--r-- 1 root root 6689369 Dec 28 06:50 ubuntu-d5-Fri.tar.gz
    > -rw-r--r-- 1 root root 6687496 Dec 29 05:02 ubuntu-d6-Sat.tar.gz
    > -rw-r--r-- 1 root root 0 Jan 1 2007 ubuntu-m01-Jan.tar.gz
    > -rw-r--r-- 1 root root 0 Feb 1 2007 ubuntu-m02-Feb.tar.gz
    > -rw-r--r-- 1 root root 0 Mar 1 2007 ubuntu-m03-Mar.tar.gz
    > -rw-r--r-- 1 root root 7201357 Apr 1 2007 ubuntu-m04-Apr.tar.gz
    > -rw-r--r-- 1 root root 21846949 May 1 2007 ubuntu-m05-May.tar.gz
    > -rw-r--r-- 1 root root 25770687 Jun 1 2007 ubuntu-m06-Jun.tar.gz
    > -rw-r--r-- 1 root root 25853647 Jul 1 05:50 ubuntu-m07-Jul.tar.gz
    > -rw-r--r-- 1 root root 26912375 Aug 1 07:12 ubuntu-m08-Aug.tar.gz
    > -rw-r--r-- 1 root root 28553373 Sep 1 05:21 ubuntu-m09-Sep.tar.gz
    > -rw-r--r-- 1 root root 30212944 Oct 1 04:32 ubuntu-m10-Oct.tar.gz
    > -rw-r--r-- 1 root root 42193964 Nov 1 06:28 ubuntu-m11-Nov.tar.gz
    > -rw-r--r-- 1 root root 13495163 Dec 1 06:21 ubuntu-m12-Dec.tar.gz
    >
    > Now it lists files with the dates formatted as follows:
    >
    > drwxr-xr-x 2 root root 4096 2006-06-20 20:44 last-full
    > drwx------ 2 root root 16384 2006-02-11 18:47 lost+found
    > -rw-r--r-- 1 root root 28122122 2007-12-30 05:38 ubuntu-d0-Sun.tar.gz
    > -rw-r--r-- 1 root root 3202388 2007-12-31 05:51 ubuntu-d1-Mon.tar.gz
    > -rw-r--r-- 1 root root 17084416 2008-01-01 06:42 ubuntu-d2-Tue.tar.gz
    > -rw-r--r-- 1 root root 6378002 2007-12-26 06:09 ubuntu-d3-Wed.tar.gz
    > -rw-r--r-- 1 root root 6701651 2007-12-27 06:12 ubuntu-d4-Thu.tar.gz
    > -rw-r--r-- 1 root root 6689369 2007-12-28 06:50 ubuntu-d5-Fri.tar.gz
    > -rw-r--r-- 1 root root 6687496 2007-12-29 05:02 ubuntu-d6-Sat.tar.gz
    > -rw-r--r-- 1 root root 37497747 2008-01-01 05:58 ubuntu-m01-Jan.tar.gz
    > -rw-r--r-- 1 root root 0 2007-02-01 00:00 ubuntu-m02-Feb.tar.gz
    > -rw-r--r-- 1 root root 0 2007-03-01 00:00 ubuntu-m03-Mar.tar.gz
    > -rw-r--r-- 1 root root 7201357 2007-04-01 05:52 ubuntu-m04-Apr.tar.gz
    > -rw-r--r-- 1 root root 21846949 2007-05-01 04:36 ubuntu-m05-May.tar.gz
    > -rw-r--r-- 1 root root 25770687 2007-06-01 19:34 ubuntu-m06-Jun.tar.gz
    > -rw-r--r-- 1 root root 25853647 2007-07-01 05:50 ubuntu-m07-Jul.tar.gz
    > -rw-r--r-- 1 root root 26912375 2007-08-01 07:12 ubuntu-m08-Aug.tar.gz
    > -rw-r--r-- 1 root root 28553373 2007-09-01 05:21 ubuntu-m09-Sep.tar.gz
    > -rw-r--r-- 1 root root 30212944 2007-10-01 04:32 ubuntu-m10-Oct.tar.gz
    > -rw-r--r-- 1 root root 42193964 2007-11-01 06:28 ubuntu-m11-Nov.tar.gz
    > -rw-r--r-- 1 root root 13495163 2007-12-01 06:21 ubuntu-m12-Dec.tar.gz
    >
    > What changed and how do I get it back to the old style?


    I've found that I can get the old style I want by typing

    $ /bin/ls -l --time-style=locale

    but how do I make this the default again?

    I guess I could

    alias ls='ls --time-style=locale'

    in my .bashrc, but it seems there should be a better way, and it still
    doesn't answer the question, "What changed?" (I was just fooling around
    with the date +FORMAT command and my backup script when the change
    apparently happened.)

    --
    Dean
    Los Angeles, CA, USA

  3. Re: ls -l date format?

    Dean DeBruin wrote:
    >
    > ls -l used to list files with the dates formated as follows:
    >
    > drwxr-xr-x 2 root root 4096 Jun 20 2006 last-full
    > drwx------ 2 root root 16384 Feb 11 2006 lost+found
    >

    .... snip ...
    >
    > -rw-r--r-- 1 root root 42193964 2007-11-01 06:28 ubuntu-m11-Nov.tar.gz
    > -rw-r--r-- 1 root root 13495163 2007-12-01 06:21 ubuntu-m12-Dec.tar.gz
    >
    > What changed and how do I get it back to the old style?


    The date. ls uses one format for the current day, another for the
    current week, the current year, and for others. I believe there
    are ways to force it to a format.

    --
    Merry Christmas, Happy Hanukah, Happy New Year
    Joyeux Noel, Bonne Annee, Frohe Weihnachten
    Chuck F (cbfalconer at maineline dot net)




    --
    Posted via a free Usenet account from http://www.teranews.com


  4. Re: ls -l date format?

    Dean DeBruin wrote:


    >> What changed and how do I get it back to the old style?

    >
    > I've found that I can get the old style I want by typing
    >
    > $ /bin/ls -l --time-style=locale
    >
    > but how do I make this the default again?
    >
    > I guess I could
    >
    > alias ls='ls --time-style=locale'
    >
    > in my .bashrc, but it seems there should be a better way, and it still
    > doesn't answer the question, "What changed?" (I was just fooling
    > around with the date +FORMAT command and my backup script when the
    > change apparently happened.)



    You can specify the default value of the `--time-style' option with
    the environment variable `TIME_STYLE'; if `TIME_STYLE' is not set the
    default style is `posix-long-iso'.




    Florian
    --

    -----------------------------------------------------------------------
    ** Hi! I'm a signature virus! Copy me into your signature, please! **
    -----------------------------------------------------------------------

  5. Re: ls -l date format?

    Florian Diesch wrote:
    > Dean DeBruin wrote:
    >
    >
    >>> What changed and how do I get it back to the old style?

    >> I've found that I can get the old style I want by typing
    >>
    >> $ /bin/ls -l --time-style=locale
    >>
    >> but how do I make this the default again?
    >>
    >> I guess I could
    >>
    >> alias ls='ls --time-style=locale'
    >>
    >> in my .bashrc, but it seems there should be a better way, and it still
    >> doesn't answer the question, "What changed?" (I was just fooling
    >> around with the date +FORMAT command and my backup script when the
    >> change apparently happened.)

    >
    > You can specify the default value of the `--time-style' option with
    > the environment variable `TIME_STYLE'; if `TIME_STYLE' is not set the
    > default style is `posix-long-iso'.


    That's it. Thanks!

    Are these environment variables documented anywhere? I didn't see this
    one in man ls.

    --
    Dean
    Los Angeles, CA, USA

  6. Re: ls -l date format?

    Dean DeBruin wrote:

    > Florian Diesch wrote:
    >> Dean DeBruin wrote:
    >>
    >>
    >>>> What changed and how do I get it back to the old style?
    >>> I've found that I can get the old style I want by typing
    >>>
    >>> $ /bin/ls -l --time-style=locale
    >>>
    >>> but how do I make this the default again?
    >>>
    >>> I guess I could
    >>>
    >>> alias ls='ls --time-style=locale'
    >>>
    >>> in my .bashrc, but it seems there should be a better way, and it still
    >>> doesn't answer the question, "What changed?" (I was just fooling
    >>> around with the date +FORMAT command and my backup script when the
    >>> change apparently happened.)

    >>
    >> You can specify the default value of the `--time-style' option with
    >> the environment variable `TIME_STYLE'; if `TIME_STYLE' is not set the
    >> default style is `posix-long-iso'.

    >
    > That's it. Thanks!
    >
    > Are these environment variables documented anywhere? I didn't see
    > this one in man ls.


    It's from the info page (info coreutils)


    Florian
    --

    -----------------------------------------------------------------------
    ** Hi! I'm a signature virus! Copy me into your signature, please! **
    -----------------------------------------------------------------------

  7. Re: ls -l date format?

    Florian Diesch wrote:
    > Dean DeBruin wrote:
    >
    >> Florian Diesch wrote:
    >>> Dean DeBruin wrote:
    >>>
    >>>
    >>>>> What changed and how do I get it back to the old style?
    >>>> I've found that I can get the old style I want by typing
    >>>>
    >>>> $ /bin/ls -l --time-style=locale
    >>>>
    >>>> but how do I make this the default again?
    >>>>
    >>>> I guess I could
    >>>>
    >>>> alias ls='ls --time-style=locale'
    >>>>
    >>>> in my .bashrc, but it seems there should be a better way, and it still
    >>>> doesn't answer the question, "What changed?" (I was just fooling
    >>>> around with the date +FORMAT command and my backup script when the
    >>>> change apparently happened.)
    >>> You can specify the default value of the `--time-style' option with
    >>> the environment variable `TIME_STYLE'; if `TIME_STYLE' is not set the
    >>> default style is `posix-long-iso'.

    >> That's it. Thanks!
    >>
    >> Are these environment variables documented anywhere? I didn't see
    >> this one in man ls.

    >
    > It's from the info page (info coreutils)
    >
    >
    > Florian


    Found it. Thanks!

    --
    Dean
    Los Angeles, CA, USA

+ Reply to Thread