<?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: How to list only files on HP-UX B.11.11 U 9000/800 in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073397#M439097</link>
    <description>Thanks a lot,&lt;BR /&gt;&lt;BR /&gt;I got satisfactory answers for my query.</description>
    <pubDate>Thu, 11 Oct 2007 07:47:10 GMT</pubDate>
    <dc:creator>diwa</dc:creator>
    <dc:date>2007-10-11T07:47:10Z</dc:date>
    <item>
      <title>How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073388#M439088</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;One dir is having files and dirs. I want to list only files. Can any one suggest how to do this?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 10 Oct 2007 07:22:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073388#M439088</guid>
      <dc:creator>diwa</dc:creator>
      <dc:date>2007-10-10T07:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073389#M439089</link>
      <description>use:&lt;BR /&gt;&lt;BR /&gt;find . -type f&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;ivan</description>
      <pubDate>Wed, 10 Oct 2007 07:25:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073389#M439089</guid>
      <dc:creator>Ivan Krastev</dc:creator>
      <dc:date>2007-10-10T07:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073390#M439090</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;find -type f&lt;BR /&gt;&lt;BR /&gt;This will show only files, not directories.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 10 Oct 2007 07:26:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073390#M439090</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2007-10-10T07:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073391#M439091</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Soory but i want something like that:&lt;BR /&gt;&lt;BR /&gt;Suppose i am under dir1:&lt;BR /&gt;under this i am having files f1.txt,f2.txt,f3.txt and subdir subdir1,subdir2.&lt;BR /&gt;&lt;BR /&gt;Now if i use ls -lrt it will list all the files as well as dir.&lt;BR /&gt;&lt;BR /&gt;If i use ls -lrt | grep "^d" it will list only dir.&lt;BR /&gt;&lt;BR /&gt;Similarly i want some command which will display f1.txt,f2.txt.f3.txt and nothing else menas no files under subdir1 and so on.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 10 Oct 2007 07:34:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073391#M439091</guid>
      <dc:creator>diwa</dc:creator>
      <dc:date>2007-10-10T07:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073392#M439092</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;add option '-p' to your ls command, then pipe it to grep: '| grep -v /'&lt;BR /&gt;&lt;BR /&gt;This exludes directories listed with '/' at the end (option -p of ls command)&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Volkmar&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Oct 2007 09:00:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073392#M439092</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2007-10-10T09:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073393#M439093</link>
      <description>ls -lrt | grep -v "^d" will work too&lt;BR /&gt;&lt;BR /&gt;V.&lt;BR /&gt;</description>
      <pubDate>Wed, 10 Oct 2007 09:04:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073393#M439093</guid>
      <dc:creator>V. Nyga</dc:creator>
      <dc:date>2007-10-10T09:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073394#M439094</link>
      <description># ls -ltr | grep ^-</description>
      <pubDate>Wed, 10 Oct 2007 11:48:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073394#M439094</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-10-10T11:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073395#M439095</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;first I want to remember, that there is more than (plain) files and directories:&lt;BR /&gt;sockets, named pipes, symbolic links, block and character devices, ... (*)&lt;BR /&gt;Excluding directories is one point, listing only plain files another.&lt;BR /&gt;&lt;BR /&gt;Second: It seems necessary for me to get just filenames without additional stat information.&lt;BR /&gt;&lt;BR /&gt;I want to highlight some aspects of the two solutions of Volker and Sandman (dropped options 'rt' which are meaningless here):&lt;BR /&gt;1) ls -p | grep -v /&lt;BR /&gt;- prints no additional status information&lt;BR /&gt;- prints anything but directories (including (*))&lt;BR /&gt;This is the best solution if you do not want to get plain files only.&lt;BR /&gt;&lt;BR /&gt;2) ls -l | grep -v "^d"&lt;BR /&gt;- prints additional status information&lt;BR /&gt;- like 1)&lt;BR /&gt;&lt;BR /&gt;3) ls -l | grep ^-&lt;BR /&gt;- prints additional status information&lt;BR /&gt;- list just plain files, which are not symlinks&lt;BR /&gt;&lt;BR /&gt;Though you could use the option 'ls -F' and filter its additional markers out, this won't seperate the block+character devices.&lt;BR /&gt;My favourite (the 'sub' has six spaces in it):&lt;BR /&gt;&lt;BR /&gt;ls -go | awk '/^-/ {for(i=1;i&amp;lt;7;i++) $i="";sub("^      ","");print}'&lt;BR /&gt;&lt;BR /&gt;This will lead to correct results even when files containing whitespace are found.&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Wed, 10 Oct 2007 13:08:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073395#M439095</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2007-10-10T13:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073396#M439096</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your sloutions.&lt;BR /&gt;&lt;BR /&gt;Special thanks to Peter.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Oct 2007 03:47:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073396#M439096</guid>
      <dc:creator>diwa</dc:creator>
      <dc:date>2007-10-11T03:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to list only files on HP-UX B.11.11 U 9000/800</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073397#M439097</link>
      <description>Thanks a lot,&lt;BR /&gt;&lt;BR /&gt;I got satisfactory answers for my query.</description>
      <pubDate>Thu, 11 Oct 2007 07:47:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-list-only-files-on-hp-ux-b-11-11-u-9000-800/m-p/5073397#M439097</guid>
      <dc:creator>diwa</dc:creator>
      <dc:date>2007-10-11T07:47:10Z</dc:date>
    </item>
  </channel>
</rss>

