You can do this using star
and it's builtin find
based on libfind
.
Call e.g.:
star -c H=cpio -find somedir -chmtime 2020-05-20T12:10:12 > archive.cpio
You may of course use complex find
rules for different time stamps if you like.
Check http://sourceforge.net/projects/schilytools/files/ for a recent star
source in the latest schilytools
tarball.
BTW: I believe the following could look like advertizing, but the information has been requested and it is OpenSource since it's beginning. star
should be well known on UNIX
as it is the oldest free tar
implementation - it started in 1982, which makes it 38 years old in 2020.
star
is the most mature and most feature complete tar
implementation I am aware of. Other implementations usually copy concepts for archive format enhancements from star
, which is identified by the SCHILY.*
property prefix introduced by star
and used by others as well.
Since 32 years, it forks into two processes that share a configurable FIFO for maximum speed. star -copy
is faster than any other known UNIX tree copy method.
Since 30 years, it supports and auto-detects various archive formats.
Since 17 years is it a generic archiver tool that implements command line compatibility to various UNIX archivers like tar
, cpio
pax
and even the incompatible GNU tar
.
Since 16 years, it includes support for the enhanced find
command line syntax via libfind
. This helps to avoid learning unneeded new usage concepts, since everybody should know how to use find
.
Since 2 years, it completely removed path name length limitations.
See http://cdrtools.sourceforge.net/private/star.html and http://schilytools.sourceforge.net/man/man1/star.1.html for more informations.