You can pipe the result to sort, like this "hadoop dfs -ls your-hdfs-dir | sort -k 6"
-- weiwei On Tue, Aug 9, 2011 at 6:03 AM, Florin P <florinp...@yahoo.com> wrote: > Hello! > Thank you for your response. I knew about "hadoop fs -ls", but > unfortunately it is listing unordered content regarding the timstamp, as you > can see in my example(look at the timestamp): > > drwxr-xr-x - platform supergroup 0 2011-07-08 17:53/user/platform/dirxx/hbase > drwxr-xr-x - dirxx supergroup 0 2011-08-09 18:29/user/platform/dirxx/image > drwxr-xr-x - platform supergroup 0 2011-07-08 > 19:26/user/platform/dirxx/import_2011_07_08 > drwxr-xr-x - platform supergroup 0 2011-07-18 19:14 > /user/platform/dirxx/import_2011_07_15 > > Regards, > Florin > > --- On Tue, 8/9/11, Uma Maheswara Rao G 72686 <mahesw...@huawei.com> > wrote: > > > From: Uma Maheswara Rao G 72686 <mahesw...@huawei.com> > > Subject: Re: Listing the content of a HDFS folder oder by timestamp using > shell > > > To: hdfs-user@hadoop.apache.org > > Date: Tuesday, August 9, 2011, 5:57 AM > > > Hi Florin, > > > > >./hadoop fs -ls <path> > > > > Above command will give timestamp also. > > > > Regards, > > Uma Mahesh > > > > ----- Original Message ----- > > From: Florin P <florinp...@yahoo.com> > > Date: Tuesday, August 9, 2011 12:52 pm > > Subject: Listing the content of a HDFS folder oder by > > timestamp using shell > > To: hdfs-user@hadoop.apache.org > > > > > Hello! > > > I would like to know how to list the content of > > a folder ordered > > > by timestamp using shell commands. > > > Thank you. > > > Regards, > > > Florin > > > > > >