Ubuntu – Listing modified files using a specific date range in a directory

command linedirectoryfind

I'm trying to figure out a way to list the modified files within a given date range. It is a bit hectic to sniff into each and every folders. I couldn't find a proper guide using a date range but all I could see is going back throwing bunch of static dates or similar.

Please advise if there's a way around to do this using find, grep or even ls arguments.

Best Answer

You can try this

find -newerct "1 Sep 2016" ! -newerct "1 Oct 2016"

to see all files modified between 1th Sep 2016 to 1th Oct 2016. It works for find version equal or higher than 4.3.3

Here c is the inode status change time. You can also use m in place of it to have the result consider file modification time only.

Also the time string can be converted to YYYYMMDD format. So, 1 Sep 2016 becomes 20160901.

source: https://stackoverflow.com/a/23508622/1039893