#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13

    list date with seconds from ls command


    Hello friends,

    When I use "ls -l" command, it only list date of file with hour and minutes. Is there option that I can see by seconds?

    Thanks
    Help me, help you, help others...
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Houston, TX
    Posts
    383
    Rep Power
    13
    ls -l --time-style=full-iso
    Debian - because life's too short for worrying.
    Best. (Python.) IRC bot. ever.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13
    Hi Strike, need little more help

    it's not working!

    tiger[netboss]/u01/app/netboss/sga/thresholding% ls -l --time-style=full-iso
    ls: illegal option -- -
    ls: illegal option -- e
    ls: illegal option -- -
    ls: illegal option -- y
    ls: illegal option -- e
    ls: illegal option -- =
    ls: illegal option -- -
    usage: ls -1RaAdCxmnlogrtucpFbqisfL [files]

    I am using Solaris 8
    Help me, help you, help others...
  6. #4
  7. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13
    Also I am using tcsh shell, if that's help you help me
    Help me, help you, help others...
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Oct 2000
    Location
    Back in the real world.
    Posts
    5,966
    Rep Power
    191
    - on some versions of unix you are not allowed to mix short and long parameters. not sure about solaris. and my "ls" has no long version for "-l".
    - my "ls" also has this parameter: "--full-time", try this
    - "man ls" and "ls --help" can also provide valuable help. only the ones on your system though...
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13
    No, can't find it on Solaris 8 server.

    It's such simple list and Unix is so inconsistant. Little disappointed.
    Help me, help you, help others...
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2001
    Location
    Houston, TX
    Posts
    383
    Rep Power
    13
    Hmm, on the Solaris machine that I checked, it says that you use LC_TIME to affect the date output, but then it points to a nonexistant man page (environ(5)) for what to use ... maybe you have that man page.
    Debian - because life's too short for worrying.
    Best. (Python.) IRC bot. ever.
  14. #8
  15. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Location
    Orlando FL
    Posts
    130
    Rep Power
    13
    OK, I will check it out. Thanks Strike!

    So far I can get around using Perl:

    perl -e 'foreach(@ARGV){$t =localtime ( ( ( stat ( $_ ) ) [9] ) ); printf("%-20s%s\n",$_,$t);}' *

    pain, but works better with a simple alias
    Last edited by digitsnake; January 14th, 2003 at 09:27 AM.
    Help me, help you, help others...

IMN logo majestic logo threadwatch logo seochat tools logo