N1VUX is my FCC-issued ham radio callsign.
I looked at Date::Calc and DateTime modules, but neither made it easy to subtract 20 years from a file timestamp from (stat)[9] and reapply with utime. And DateTime.pm required 3 prerequisites, one of which required Module::Build. Eventually I'll hook up the CPANDebian magic, but not until after I upgrade the OS, so that was out.
So, old trick -- separate the problem into easy steps.
perl -MPOSIX=strftime -MFile::Find
-le 'find( { wanted=>\&foo , follow=>1}, "/");
sub foo {return if -M $_ > 0;
my $ts=strftime ("%Y%m%d%H%M.%S",
localtime ((stat($_))[9]));
return unless $ts=~s/\b(202[45])/$1-20/e;
print "touch -t $ts $File::Find::name";}' \
| tee touch-2025
$ (set -x; ../touch-2025)
+ ../touch-2025
++ touch -t 200502052006.08/
++ touch -t 200412192026.04/homex
++ touch -t 200412192133.13/homex/wdr
++ touch -t 200412192026.04/homex/wdr/.bashrc
++ touch -t 200412192026.04/homex/wdr/.bash_profile
...
Of course, I tested it as an unprivileged user before running it as root from/ (via sudo bash).
Setting the hardware clock (Score:1)
hwclock --systohcwork?Define "not easy" (Score:2)
my $dt = DateTime->from_epoch( epoch => (stat $file)[9] );
$dt->subtract( years => 20 );
utime $dt->epoch, $dt->epoch, $file;
Prereqs are another issue, but I don't really care if people complain about that so much.
Maybe by "not easy" you meant not in the docs as such, or not in the FAQ.