Ask a Question related to UNIX Programming, Design and Development.

  1. #1

    Default ls showing seconds?

    Hi all!

    Is there any way that ls show timestamps with seconds (i.e. format
    hh:mm:ss)?
    If not ls, maybe there is another command...

    Thanks!/Alvaro


    Alvaro Puente Guest

  2. Similar Questions and Discussions

    1. Quotes that appear every few seconds
      I am using dreamweaver and want to create a small side window on the page where short text quotes appear. The quotes need to change every 5-10...
    2. Need to convert seconds to DD:HH:MM:SS
      So clearly I'm being stupid and this seemingly basic math is beyond my abilities at the moment. I've tried various things, but can't seem to figure...
    3. looping every x seconds
      Hello, In PERL how do I execute a block of code every "x" seconds? I'm talking a loop or similar but it runs every x seconds, where x is given.
    4. 2 seconds
      hiya! check this: only the banks know about this, but it will save you a fortune are you prepared for lower mortgage repayments? ...
    5. format # of seconds to hh:mm
      I am trying to trick some Infromix SQL command, so it will format the output of a query into the HH:MM. Say, a row data value 70 will be print as...
  3. #2

    Default Re: ls showing seconds?

    In article <bf92vf$7p8$1@newstree.wise.edt.ericsson.se>,
    Alvaro Puente <alvaro.puente-gonzalez@ece.ericsson.se> wrote:
    >Is there any way that ls show timestamps with seconds (i.e. format
    >hh:mm:ss)?
    >If not ls, maybe there is another command...
    GNU ls has a --full-date option that I think will do this.

    --
    Barry Margolin, [email]barry.margolin@level3.com[/email]
    Level(3), Woburn, MA
    *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
    Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
    Barry Margolin Guest

  4. #3

    Default Re: ls showing seconds?

    Alvaro Puente wrote:
    > Is there any way that ls show timestamps with seconds (i.e. format
    > hh:mm:ss)?
    You haven't specified a platform, but ls from GNU fileutils 4.1.9 can do
    it like so (probably not the only way):

    ls -l --time-style=+'%D %r'
    > If not ls, maybe there is another command...
    Probably, depending on your platform. I have a separate /usr/bin/stat
    command that prints out all of the info from a struct stat for a given
    file, which includes this information. Perhaps there's something
    similar available on your machine.

    -Marcus

    Marcus Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139