Linux find command from certain date

Published on February 25, 2022 at 12:20:16 AM GMT+8 by Administrator

Useful command to find files from certain date

Linux find command from certain date

Here we will show find command that can be useful when want to check certain files from certain date.

find . -type f -newermt '2020-04-01 00:00:00'

You can use the find command to find all files that have been modified after a certain number of days.

For example, to find all files in the current directory that have been modified since yesterday (24 hours ago) use:

find . -maxdepth 1 -mtime -1

Note that to find files modified before 24 hours ago, you have to use -mtime +1 instead of -mtime -1.