Linux: find files between two date and copy into another directory

Find all the files between “2019-02-15 00:00:00” and “2019-02-18 00:00:00”.

1)Copy them into directory “/tmp/tracebackup/”.

$ find . -type f -name “*.trc” -newermt “2019-02-15 00:00:00” ! -newermt “2019-02-18 00:00:00″| xargs cp -t /tmp/tracebackup/

-t, –target-directory=DIRECTORY ; copy all SOURCE arguments into DIRECTORY

2)Tar and zip the files.

$find . -type f -name “*.trc” -newermt “2019-02-15 00:00:00” ! -newermt “2019-02-18 00:00:00″| xargs tar -czvf crs_traces.tar.gz