<?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 Re: list file problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116797#M314129</link>
    <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;I tried all command above , but the output file name still have  ./  as below &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now the output&lt;BR /&gt;==============&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 ./test1.txt&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 ./test2.txt&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 ./test3.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My desired output &lt;BR /&gt;=================&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 test1.txt&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 test2.txt&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 test3.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;can advise what can i do ? thx</description>
    <pubDate>Fri, 21 Dec 2007 10:58:40 GMT</pubDate>
    <dc:creator>ust3</dc:creator>
    <dc:date>2007-12-21T10:58:40Z</dc:date>
    <item>
      <title>list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116785#M314117</link>
      <description>When I use find . -type f -exec ls -lt {} \; to list file , the output is as below , all have ./ sign in every fle , can advise how to erase the ./ of the output ? Thx&lt;BR /&gt;&lt;BR /&gt;./test1.txt&lt;BR /&gt;./test2.txt&lt;BR /&gt;./test3.txt&lt;BR /&gt;&lt;BR /&gt;my desired output is&lt;BR /&gt;test1.txt&lt;BR /&gt;test2.txt&lt;BR /&gt;test3.txt&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Dec 2007 09:32:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116785#M314117</guid>
      <dc:creator>ust3</dc:creator>
      <dc:date>2007-12-14T09:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116786#M314118</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try,&lt;BR /&gt;&lt;BR /&gt;# find . -type f -exec ls {} \; | awk -F/ '{ print $2 }'&lt;BR /&gt;&lt;BR /&gt;# find . -type f | xargs ls | awk -F/ '{ print $2}'&lt;BR /&gt;&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Fri, 14 Dec 2007 09:43:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116786#M314118</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2007-12-14T09:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116787#M314119</link>
      <description>Try,&lt;BR /&gt;&lt;BR /&gt;#find . -type f -exec ls {} \; | cut -c 3-&lt;BR /&gt;&lt;BR /&gt;Best Luck.</description>
      <pubDate>Fri, 14 Dec 2007 09:50:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116787#M314119</guid>
      <dc:creator>Shrikant Lavhate</dc:creator>
      <dc:date>2007-12-14T09:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116788#M314120</link>
      <description>Robert-Jan: ... awk -F/ &lt;BR /&gt;&lt;BR /&gt;It is probably safer to remove the "./" then use awk -F/:&lt;BR /&gt;$ find . -type f -exec ll -t + | sed 's:\./::'&lt;BR /&gt;&lt;BR /&gt;Especially if find goes into subdirectories.</description>
      <pubDate>Fri, 14 Dec 2007 09:51:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116788#M314120</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-14T09:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116789#M314121</link>
      <description>For example:&lt;BR /&gt;$ find . -type f -exec ls -lt {} \;&lt;BR /&gt;-rw-r--r--   1 user   group         0 Dec 14 11:46 ./testdir/test4.txt&lt;BR /&gt;-rw-r--r--   1 user   group         0 Dec 14 11:46 ./test1.txt&lt;BR /&gt;-rw-r--r--   1 user   group         0 Dec 14 11:46 ./test2.txt&lt;BR /&gt;-rw-r--r--   1 user   group         0 Dec 14 11:46 ./test3.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ find . -type f -exec ls -lt {} \; | sed -e 's! ./! !'&lt;BR /&gt;-rw-r--r--   1 user   group         0 Dec 14 11:46 testdir/test4.txt&lt;BR /&gt;-rw-r--r--   1 user   group         0 Dec 14 11:46 test1.txt&lt;BR /&gt;-rw-r--r--   1 user   group         0 Dec 14 11:46 test2.txt&lt;BR /&gt;-rw-r--r--   1 user   group         0 Dec 14 11:46 test3.txt&lt;BR /&gt;&lt;BR /&gt;Note that "-exec &lt;COMMAND&gt; {} \;" syntax is very slow if there are lots of files, because it forks a new process for each file. As the ls command gets only one file to list at a time, the -t option (sort by time) will not be effective: the listing will be in the order determined by the find command.&lt;BR /&gt;&lt;BR /&gt;The "-exec &lt;COMMAND&gt; \+" syntax will be much more efficient, as each ls command will get as many files to list as possible (the limitation is the maximum length of a command line). If you use the -t option with the ls command and the list of files fits on a single command line, your list is guaranteed to be correctly ordered by time; but if find needs to execute multiple "ls -lt" commands, the sorting order of the entire list cannot be guaranteed. &lt;BR /&gt;&lt;BR /&gt;$ find . -type f -exec ls -lt \+ | sed -e 's! ./! !'&lt;BR /&gt;-rw-r--r--   1 mkurkela   mkurkela         0 Dec 14 11:46 testdir/test4.txt&lt;BR /&gt;-rw-r--r--   1 mkurkela   mkurkela         0 Dec 14 11:46 test3.txt&lt;BR /&gt;-rw-r--r--   1 mkurkela   mkurkela         0 Dec 14 11:46 test2.txt&lt;BR /&gt;-rw-r--r--   1 mkurkela   mkurkela         0 Dec 14 11:46 test1.txt&lt;BR /&gt;&lt;BR /&gt;MK&lt;/COMMAND&gt;&lt;/COMMAND&gt;</description>
      <pubDate>Fri, 14 Dec 2007 10:26:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116789#M314121</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2007-12-14T10:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116790#M314122</link>
      <description>thx reply and sorry to mistake &lt;BR /&gt;&lt;BR /&gt;my desired output should be as below , can advise how to do it ? thx&lt;BR /&gt;&lt;BR /&gt;-rw-r--r--    1 user1    edp            1296 Jun 20 07:11 test1.txt&lt;BR /&gt;-rw-r--r--    1 user1    edp            1296 Jun 20 07:11 test2.txt&lt;BR /&gt;-rw-r--r--    1 user1    edp            1296 Jun 20 07:11 test3.txt</description>
      <pubDate>Fri, 14 Dec 2007 10:50:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116790#M314122</guid>
      <dc:creator>ust3</dc:creator>
      <dc:date>2007-12-14T10:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116791#M314123</link>
      <description>&amp;gt;my desired output should be as below&lt;BR /&gt;&lt;BR /&gt;My sed will do that.  But as MK says, it may not be sorted the way you want.</description>
      <pubDate>Fri, 14 Dec 2007 10:57:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116791#M314123</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-14T10:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116792#M314124</link>
      <description>Already answered by Matti usind stream editior sed.!! check above..</description>
      <pubDate>Fri, 14 Dec 2007 10:59:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116792#M314124</guid>
      <dc:creator>Shrikant Lavhate</dc:creator>
      <dc:date>2007-12-14T10:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116793#M314125</link>
      <description>&amp;gt; Shrikant: Already answered by Matti using sed.&lt;BR /&gt;&lt;BR /&gt;Actually MK forgot to quote the ".".  But he did guard for embedded ".". by using a space, so:&lt;BR /&gt;... | sed 's: \./: :'</description>
      <pubDate>Fri, 14 Dec 2007 11:12:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116793#M314125</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-14T11:12:26Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116794#M314126</link>
      <description>How about the output of pwd(1) to find(1) instead of using "." in the path-list?&lt;BR /&gt;&lt;BR /&gt;# find `pwd` -type f -exec ll -lt {} \;</description>
      <pubDate>Fri, 14 Dec 2007 15:48:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116794#M314126</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-12-14T15:48:27Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116795#M314127</link>
      <description>&amp;gt;Sandman: How about the output of pwd(1)&lt;BR /&gt;&lt;BR /&gt;Using $PWD in find will give absolute paths for everything.&lt;BR /&gt;$ find $PWD -type f -exec ll +</description>
      <pubDate>Sat, 15 Dec 2007 07:04:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116795#M314127</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-15T07:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116796#M314128</link>
      <description>Hi,&lt;BR /&gt;why not only:&lt;BR /&gt;ls -lt|grep -v ^d&lt;BR /&gt;&lt;BR /&gt;You will have a list of file in cronological order in current directory but not directories&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Tue, 18 Dec 2007 10:47:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116796#M314128</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-12-18T10:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116797#M314129</link>
      <description>thx reply ,&lt;BR /&gt;&lt;BR /&gt;I tried all command above , but the output file name still have  ./  as below &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Now the output&lt;BR /&gt;==============&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 ./test1.txt&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 ./test2.txt&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 ./test3.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;My desired output &lt;BR /&gt;=================&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 test1.txt&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 test2.txt&lt;BR /&gt;-rw-r--r-- 1 user1 edp 1296 Jun 20 07:11 test3.txt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;can advise what can i do ? thx</description>
      <pubDate>Fri, 21 Dec 2007 10:58:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116797#M314129</guid>
      <dc:creator>ust3</dc:creator>
      <dc:date>2007-12-21T10:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: list file problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116798#M314130</link>
      <description>&amp;gt;but the output file name still have ./ as below &lt;BR /&gt;&lt;BR /&gt;I thought I mentioned why on reply with 11:12:26 GMT.  Try this:&lt;BR /&gt;$ find . -type f -exec ll -t + | sed 's: \./: :'</description>
      <pubDate>Fri, 21 Dec 2007 12:07:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/list-file-problem/m-p/4116798#M314130</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-12-21T12:07:09Z</dc:date>
    </item>
  </channel>
</rss>

