Skip to content
Advertisement

Get list of files whose creation date is greater than some date linux

I have these files in Hadoop and want the list of all files whose creation date is greater than 2016-11-21.

JavaScript

I tried the command below but it’s printing all the files. How to get only the one’s which satisfy the condition

JavaScript

Advertisement

Answer

Pass the input date as a variable into awk expression(via -v option):

JavaScript

The output:

JavaScript
Advertisement