4

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.

1 Answer 1

5

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

1
  • 1
    thanks for the prompt reply! worked like a charm. just to avoid doing a find every, I have just added the path as find /path/of/the/folder following with the command... worked pretty well! :)
    – AzkerM
    Oct 22, 2016 at 8:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .