<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ls options in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993106#M93606</link>
    <description>how do i get the time stamp of a file in hh:mm:ss format&lt;BR /&gt;ls -l will give only hh:mm only..&lt;BR /&gt;i need even the seconds..&lt;BR /&gt;plsssss help</description>
    <pubDate>Thu, 03 May 2007 07:13:46 GMT</pubDate>
    <dc:creator>Rinky</dc:creator>
    <dc:date>2007-05-03T07:13:46Z</dc:date>
    <item>
      <title>ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993106#M93606</link>
      <description>how do i get the time stamp of a file in hh:mm:ss format&lt;BR /&gt;ls -l will give only hh:mm only..&lt;BR /&gt;i need even the seconds..&lt;BR /&gt;plsssss help</description>
      <pubDate>Thu, 03 May 2007 07:13:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993106#M93606</guid>
      <dc:creator>Rinky</dc:creator>
      <dc:date>2007-05-03T07:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993107#M93607</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;GNU 'ls' has the '--full-time' switch.  It also supports colorized output, which is a beautiful thing.  The GNU coreutils depot is available here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/coreutils-6.7/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/coreutils-6.7/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Alternatively, try the following perl construct:&lt;BR /&gt;&lt;BR /&gt;perl -e 'foreach(@ARGV){$time=localtime((stat($_))[9]);printf("%-30s%s\n",$_,$time)}' *&lt;BR /&gt;&lt;BR /&gt;PCS</description>
      <pubDate>Thu, 03 May 2007 07:31:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993107#M93607</guid>
      <dc:creator>spex</dc:creator>
      <dc:date>2007-05-03T07:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993108#M93608</link>
      <description>hi Rinky,&lt;BR /&gt;&lt;BR /&gt;Unfortunately, using ls, you cannot get this information.&lt;BR /&gt;&lt;BR /&gt;if you do man ls&lt;BR /&gt;you will not find any such switch.&lt;BR /&gt;&lt;BR /&gt;good luck!&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Thu, 03 May 2007 07:37:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993108#M93608</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2007-05-03T07:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993109#M93609</link>
      <description>Hi rinky,&lt;BR /&gt;&lt;BR /&gt;You can also try this old resource-comsuming trick:&lt;BR /&gt;&lt;BR /&gt;# echo &lt;FILENAME&gt; | cpio -o 2&amp;gt;/dev/null|cpio -ivt 2&amp;gt;/dev/null|awk '{print $7,$4,$5,$6}'&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.&lt;/FILENAME&gt;</description>
      <pubDate>Thu, 03 May 2007 07:39:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993109#M93609</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2007-05-03T07:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993110#M93610</link>
      <description>hi again,&lt;BR /&gt;&lt;BR /&gt;Spex's perl solution works fine..&lt;BR /&gt;&lt;BR /&gt;$ perl -e 'foreach(@ARGV){$time=localtime((stat($_))[9]);printf("%-30s%s\n",$_,$time)}' *&lt;BR /&gt;&lt;BR /&gt;v_syt280_1.sql                Thu Mar 30 08:19:02 2006&lt;BR /&gt;vknt1002.sql                  Thu Mar 30 08:19:02 2006&lt;BR /&gt;yd.sql                        Thu Mar 30 08:19:02 2006&lt;BR /&gt;ydcmtpfs.sql                  Thu Mar 30 08:19:02 2006&lt;BR /&gt;ydtest.sql                    Thu Mar 30 08:19:02 2006&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Thu, 03 May 2007 07:44:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993110#M93610</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2007-05-03T07:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993111#M93611</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# perl -MPOSIX -le 'for (@ARGV) {-e $_ &amp;amp;&amp;amp; print join " ",$_,strftime("%x %X",localtime((stat($_))[9]))}' /tmp /etc/hosts&lt;BR /&gt;&lt;BR /&gt;/tmp 05/03/07 08:46:36&lt;BR /&gt;/etc/hosts 05/05/06 08:33:12&lt;BR /&gt;&lt;BR /&gt;That is, pass as many file or directory names as arguments as you want.</description>
      <pubDate>Thu, 03 May 2007 07:48:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993111#M93611</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-05-03T07:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993112#M93612</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;# perl -MPOSIX -le 'for (@ARGV) {-e $_ &amp;amp;&amp;amp; print join " ",$_,strftime("%x %X",localtime((stat($_))[9]))}' /tmp /etc/hosts&lt;BR /&gt;&lt;BR /&gt;/tmp 05/03/07 08:46:36&lt;BR /&gt;/etc/hosts 05/05/06 08:33:12&lt;BR /&gt;&lt;BR /&gt;That is, pass as many file or directory names as arguments as you want.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 03 May 2007 07:48:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993112#M93612</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-05-03T07:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993113#M93613</link>
      <description>actually i dint want the solution in perl.&lt;BR /&gt;but John`s solution works perfectly fine.&lt;BR /&gt;Thanks John..&lt;BR /&gt;&lt;BR /&gt;Thanks to everybody...</description>
      <pubDate>Thu, 03 May 2007 22:28:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993113#M93613</guid>
      <dc:creator>Rinky</dc:creator>
      <dc:date>2007-05-03T22:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993114#M93614</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; actually i dint want the solution in perl.&lt;BR /&gt;&lt;BR /&gt;Then SAY SO in your requirements up front so that we don't waste our time.  You asked for help and you got it --- this time.&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Thu, 03 May 2007 23:07:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993114#M93614</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-05-03T23:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993115#M93615</link>
      <description>Ok.. one more query on ls.&lt;BR /&gt;in temp directory, there are files with filetype ABC and if i give&lt;BR /&gt;ls -lrt *ABC, it will give a listing according to timestamp.&lt;BR /&gt;&lt;BR /&gt;But from other directories if i give&lt;BR /&gt;ls -lrt /temp/*ABC,&lt;BR /&gt;the output differs than the above.&lt;BR /&gt;&lt;BR /&gt;y is it different?? any idea??</description>
      <pubDate>Thu, 10 May 2007 00:45:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993115#M93615</guid>
      <dc:creator>Rinky</dc:creator>
      <dc:date>2007-05-10T00:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993116#M93616</link>
      <description>&amp;gt;ls -lrt *ABC, it will give a listing according to timestamp.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;But from other directories if i give&lt;BR /&gt;ls -lrt /temp/*ABC,&lt;BR /&gt;the output differs than the above.&lt;BR /&gt;&lt;BR /&gt;Different how?  I just see the full path vs just the filename:&lt;BR /&gt;Dec 14  2005 threadinit.o&lt;BR /&gt;Dec 14  2005 /var/tmp/threadinit.o&lt;BR /&gt;</description>
      <pubDate>Thu, 10 May 2007 07:32:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993116#M93616</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-05-10T07:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993117#M93617</link>
      <description>Yes,&lt;BR /&gt;&lt;BR /&gt;ls -rt will give the right output only till the minutes.&lt;BR /&gt;i.e if the files are all created in one minute, with few seconds gap, ls will give the output in alphabetical order.&lt;BR /&gt;&lt;BR /&gt;Is there any way to get the order right, keeping in mind the seconds of creation also?</description>
      <pubDate>Thu, 21 Jun 2007 03:18:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993117#M93617</guid>
      <dc:creator>Rinky</dc:creator>
      <dc:date>2007-06-21T03:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: ls options</title>
      <link>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993118#M93618</link>
      <description>&lt;P&gt;&amp;gt;ls -rt will give the right output only till the minutes.&lt;BR /&gt;&lt;BR /&gt;Since ls(1) has the timestamp in seconds, you have to assume it sorts based on that. Not minutes then alpha.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Is there any way to get the order right, keeping in mind the seconds&lt;BR /&gt;&lt;BR /&gt;This is done.&lt;BR /&gt;$ touch -t 200706210200.01 aa&lt;BR /&gt;$ touch -t 200706210200.09 zz&lt;BR /&gt;$ ll -t -og&lt;BR /&gt;-rw-rw-r-- 0 Jun 21 02:00 zz&lt;BR /&gt;-rw-rw-r-- 0 Jun 21 02:00 aa&lt;BR /&gt;$ ll -rt -og&lt;BR /&gt;-rw-rw-r-- 0 Jun 21 02:00 aa&lt;BR /&gt;-rw-rw-r-- 0 Jun 21 02:00 zz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also change the ls output format by looking at these posts:&lt;/P&gt;&lt;P&gt;&lt;A href="http://h30499.www3.hp.com/t5/tag/ls.cat/tg-p" target="_blank"&gt;http://h30499.www3.hp.com/t5/tag/ls.cat/tg-p&lt;/A&gt;﻿&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2011 03:10:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/ls-options/m-p/3993118#M93618</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-09-26T03:10:40Z</dc:date>
    </item>
  </channel>
</rss>

