Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

 

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

 

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
Don't have an account?
Coming from Hortonworks? Activate your account here