2

Find directories modified between two dates

find . -type d -newermt "2019-01-01" ! -newermt "2019-02-01" -exec ls -ld {} \;

May 20, 2019fenchu

Explanation

find . finds all paths under the current directory.

-type d matches paths that are directories.

-newermt "2019-01-01" matches paths that have a modification time newer than "2019-01-01".

! -newermt "2019-02-01" matches paths that have a modification time not newer than "2019-02-01".

-exec ls -ld {} \; executes ls -ld for each path matched by the conditions of the find command.

If we wanted just the matching paths without executing ls -ld, we could simply omit -exec and everything after it.