Support Questions
Find answers, ask questions, and share your expertise

listing hdfs files as per timestamp

Solved Go to solution
Highlighted

listing hdfs files as per timestamp

Contributor

How to list hdfs files according to timestamp? just like ls -lt in unix.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: listing hdfs files as per timestamp

Contributor

I found the answer myself.  Using below command I can achieve ls -lt output in hdfs.

 

hdfs dfs -ls /test | sort -k6,7

 

View solution in original post

2 REPLIES 2

Re: listing hdfs files as per timestamp

Contributor

I found the answer myself.  Using below command I can achieve ls -lt output in hdfs.

 

hdfs dfs -ls /test | sort -k6,7

 

View solution in original post

Highlighted

Re: listing hdfs files as per timestamp

Community Manager

I'm happy to see you found it. Thanks for sharing. :)


Cy Jervis, Community Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:
Community Guidelines
How to use the forum