<?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>question Re: hadoop files list sorted by time in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114332#M38530</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2696/bigdatasupernova.html" nodeid="2696"&gt;@bigdata.neophyte&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;As per this jira : &lt;A href="https://issues.apache.org/jira/browse/HADOOP-8934" target="_blank"&gt;https://issues.apache.org/jira/browse/HADOOP-8934&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-t option is supported from hadoop 2.8.&lt;/P&gt;&lt;P&gt;Possibly a doc bug in apache doc &lt;A href="https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-common/FileSystemShell.html#ls"&gt;here&lt;/A&gt;. &lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2016 21:05:35 GMT</pubDate>
    <dc:creator>sandyy006</dc:creator>
    <dc:date>2016-08-22T21:05:35Z</dc:date>
    <item>
      <title>hadoop files list sorted by time</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114330#M38528</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to run a very simple command &lt;/P&gt;&lt;PRE&gt;hdfs dfs -ls -t /&lt;/PRE&gt;&lt;P&gt;However, it prompts me saying that -t is an illegal option. However, when I look for documentation it says -t is supported. FYI, I am using Hadoop 2.7.1 version. Any idea how to list the files / directories in HDFS sorted by time?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 21:02:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114330#M38528</guid>
      <dc:creator>bigdata_superno</dc:creator>
      <dc:date>2016-08-22T21:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: hadoop files list sorted by time</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114331#M38529</link>
      <description>&lt;P&gt;Please check option as below .&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;hdfs dfs -ls /tmp | sort -k6,7&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;hadoop 2.7.x &lt;A href="http://hadoop.apache.org/docs/r2.7.0/hadoop-project-dist/hadoop-common/FileSystemShell.html#ls"&gt;ls command&lt;/A&gt; , the below following options available :&lt;/P&gt;&lt;PRE&gt;Usage: hadoop fs -ls [-d] [-h] [-R] [-t] [-S] [-r] [-u] &amp;lt;args&amp;gt;

Options:
-d: Directories are listed as plain files.
-h: Format file sizes in a human-readable fashion (eg 64.0m instead of 67108864).
-R: Recursively list subdirectories encountered.
-t: Sort output by modification time (most recent first).
-S: Sort output by file size.
-r: Reverse the sort order.
-u: Use access time rather than modification time for display and sorting.
&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2016 21:04:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114331#M38529</guid>
      <dc:creator>shivkumar82015</dc:creator>
      <dc:date>2016-08-22T21:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: hadoop files list sorted by time</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114332#M38530</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2696/bigdatasupernova.html" nodeid="2696"&gt;@bigdata.neophyte&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;As per this jira : &lt;A href="https://issues.apache.org/jira/browse/HADOOP-8934" target="_blank"&gt;https://issues.apache.org/jira/browse/HADOOP-8934&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-t option is supported from hadoop 2.8.&lt;/P&gt;&lt;P&gt;Possibly a doc bug in apache doc &lt;A href="https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-common/FileSystemShell.html#ls"&gt;here&lt;/A&gt;. &lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 21:05:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114332#M38530</guid>
      <dc:creator>sandyy006</dc:creator>
      <dc:date>2016-08-22T21:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: hadoop files list sorted by time</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114333#M38531</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/2696/bigdatasupernova.html" nodeid="2696" target="_blank"&gt;@bigdata.neophyte&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;From below screenshot we see that the "-t" is not more with current version of hadoop.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6848-screen-shot-2016-08-22-at-73330-pm.png" style="width: 483px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23142i019D8859BD8D8654/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6848-screen-shot-2016-08-22-at-73330-pm.png" alt="6848-screen-shot-2016-08-22-at-73330-pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You can try - hdfs dfs -ls -R / | sort  -k6,7&lt;/P&gt;&lt;P&gt;Check - &lt;A href="http://mail-archives.apache.org/mod_mbox/hadoop-hdfs-user/201108.mbox/%3CCAFDdpB10sHYdaJC4JRcHHrcrdiOj4LBU2OZboabh2H3L3UjbEw@mail.gmail.com%3E" target="_blank" rel="nofollow noopener noreferrer"&gt;http://mail-archives.apache.org/mod_mbox/hadoop-hdfs-user/201108.mbox/%3CCAFDdpB10sHYdaJC4JRcHHrcrdiOj4LBU2OZboabh2H3L3UjbEw@mail.gmail.com%3E&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:05:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114333#M38531</guid>
      <dc:creator>sshimpi</dc:creator>
      <dc:date>2019-08-19T11:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: hadoop files list sorted by time</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114334#M38532</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/2696/bigdatasupernova.html" nodeid="2696"&gt;@bigdata.neophyte&lt;/A&gt;&lt;P&gt; -t option seems to not available in 2.7.1 version which is included with HDP 2.4.2. &lt;/P&gt;&lt;P&gt;This option is included in hadoop 2.7.3 which is available with HDP 2.5 Tech preview . &lt;/P&gt;&lt;PRE&gt;[hdfs@hdp1 ~]$ hadoop version
Hadoop 2.7.3.2.5.0.0-1133
Subversion git@github.com:hortonworks/hadoop.git -r 93bf28063ef319be6833d3d6f117d44e0b6b8fa9
Compiled by jenkins on 2016-08-03T11:38Z
Compiled with protoc 2.5.0
From source with checksum 1aed9e48ca6f7cd4ada3a36b1cd5feb
This command was run using /usr/hdp/2.5.0.0-1133/hadoop/hadoop-common-2.7.3.2.5.0.0-1133.jar
[hdfs@hdp1 ~]$ hdfs dfs -ls -t -help
-ls: Illegal option -help
Usage: hadoop fs [generic options] -ls [-C] [-d] [-h] [-q] [-R] [-t] [-S] [-r] [-u] [&amp;lt;path&amp;gt; ...]

[hdfs@hdp1 ~]$ hdp-select versions
2.5.0.0-1133

&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2016 21:18:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hadoop-files-list-sorted-by-time/m-p/114334#M38532</guid>
      <dc:creator>rguruvannagari</dc:creator>
      <dc:date>2016-08-22T21:18:18Z</dc:date>
    </item>
  </channel>
</rss>

