[Racket] Filetree stat by month

This utility scans a filetree and provides the following info: how many files were modified by each month and under which paths.

The idea came to me when I found an old HDD I used in past, and by observing file stamps, I tried to understand, to which epoch it belongs...

As they say, a picture is worth a thousand words. So this is an example for the GNU coreutils-5.0 archive

--- legend (log scale) ---
110  files: ****************
219  files: ********************************
329  files: *********************************************
438  files: **********************************************************
548  files: **********************************************************************
658  files: ********************************************************************************
767  files: ******************************************************************************************
877  files: ****************************************************************************************************
--- stat ---
(...skipped...)
1996-Dec 20   files: ***
(...skipped...)
1999-Apr 21   files: ***
(...skipped...)
1999-Nov 61   files: *********
(...skipped...)
2000-Feb 13   files: **
(...skipped...)
2000-Apr 10   files: *
(...skipped...)
2000-Aug 27   files: ****
(...skipped...)
2000-Oct 7    files: *
(...skipped...)
2001-Mar 123  files: ******************
(...skipped...)
2001-Aug 29   files: ****
2001-Sep 24   files: ***
(...skipped...)
2001-Nov 12   files: *
2001-Dec 8    files: *
2002-Jan 7    files: *
2002-Feb 13   files: **
2002-Mar 12   files: *
2002-Apr 9    files: *
(...skipped...)
2002-Jun 15   files: **
2002-Jul 877  files: ****************************************************************************************************
2002-Aug 55   files: ********
2002-Sep 33   files: *****
2002-Oct 114  files: *****************
2002-Nov 28   files: ****
2002-Dec 41   files: ******
2003-Jan 213  files: *******************************
2003-Feb 71   files: ***********
2003-Mar 230  files: *********************************
2003-Apr 141  files: *********************
--- stat paths ---
1993-Mar: 1 files were created/modified under "tests/tr"; ...
1993-Jun: 4 files were created/modified under "src"; ...
1994-Nov: 1 files were created/modified under "tests/join"; ...
1996-Mar: 1 files were created/modified under "old/sh-utils"; ...
1996-Jul: 1 files were created/modified under "lib"; ...
1996-Oct: 1 files were created/modified under "lib"; ...
1996-Dec: 20 files were created/modified under "tests/pr"; ...
1997-Feb: 4 files were created/modified under "tests/pr"; ...
1997-Jul: 2 files were created/modified under "tests/head"; ...
1997-Nov: 1 files were created/modified under "tests/wc"; ...
1997-Dec: 3 files were created/modified under "lib"; ...
1998-Jan: 2 files were created/modified under "lib"; ...
1998-Feb: 1 files were created/modified under "old/fileutils"; 1 files were created/modified under "src"; ...
1998-May: 1 files were created/modified under "tests/tac"; 1 files were created/modified under "lib"; ...
1998-Jun: 1 files were created/modified under "tests/test"; ...
1998-Oct: 1 files were created/modified under "tests/dircolors"; ...
1998-Dec: 1 files were created/modified under "lib"; ...
1999-Jan: 1 files were created/modified under "lib"; ...
1999-Apr: 19 files were created/modified under "tests/pr"; 2 files were created/modified under "lib"; ...
1999-May: 1 files were created/modified under "tests"; 1 files were created/modified under "tests/touch"; ...
1999-Jul: 2 files were created/modified under "lib"; 1 files were created/modified under "tests/md5sum"; ...
1999-Sep: 1 files were created/modified under "lib"; ...
1999-Nov: 60 files were created/modified under "man"; 1 files were created/modified under "tests/rmdir"; ...
2000-Jan: 3 files were created/modified under "lib"; 1 files were created/modified under ""; 1 files were created/modified under "tests/tsort"; ...
2000-Feb: 13 files were created/modified under "man"; ...
2000-Mar: 1 files were created/modified under "tests/touch"; ...
2000-Apr: 5 files were created/modified under "lib"; 2 files were created/modified under "man"; 1 files were created/modified under "tests/factor"; ...
2000-May: 1 files were created/modified under "tests/unexpand"; 1 files were created/modified under "lib"; ...
2000-Jun: 4 files were created/modified under "lib"; 1 files were created/modified under "tests/sum"; ...
2000-Jul: 2 files were created/modified under "lib"; 1 files were created/modified under "tests/touch"; 1 files were created/modified under "tests/md5sum"; ...
2000-Aug: 26 files were created/modified under "lib"; 1 files were created/modified under "tests"; ...
2000-Sep: 1 files were created/modified under "lib"; ...
2000-Oct: 4 files were created/modified under "lib"; 1 files were created/modified under "tests"; 1 files were created/modified under "tests/sha1sum"; ...
2000-Nov: 3 files were created/modified under "src"; 2 files were created/modified under "tests"; 1 files were created/modified under "tests/join"; ...
2000-Dec: 3 files were created/modified under "lib"; 1 files were created/modified under "tests"; 1 files were created/modified under "m4"; ...
2001-Feb: 1 files were created/modified under "src"; 1 files were created/modified under "lib"; ...
2001-Mar: 117 files were created/modified under "tests/pr"; 4 files were created/modified under "lib"; 1 files were created/modified under "tests/sha1sum"; ...
2001-Apr: 1 files were created/modified under "tests/dd"; 1 files were created/modified under "man"; ...
2001-May: 4 files were created/modified under "lib"; 1 files were created/modified under "doc"; ...
2001-Aug: 20 files were created/modified under "m4"; 7 files were created/modified under "lib"; 1 files were created/modified under "tests/mv"; ...
2001-Sep: 16 files were created/modified under "m4"; 4 files were created/modified under "man"; 3 files were created/modified under "lib"; ...
2001-Oct: 2 files were created/modified under "lib"; 2 files were created/modified under "man"; 1 files were created/modified under "tests/mv"; ...
2001-Nov: 8 files were created/modified under "lib"; 3 files were created/modified under "m4"; 1 files were created/modified under "tests/tail-2"; ...
2001-Dec: 7 files were created/modified under "lib"; 1 files were created/modified under "man"; ...
2002-Jan: 4 files were created/modified under "lib"; 1 files were created/modified under "tests"; 1 files were created/modified under "tests/misc"; ...
2002-Feb: 6 files were created/modified under "lib"; 1 files were created/modified under "tests/sort"; 1 files were created/modified under "tests/tail"; ...
2002-Mar: 6 files were created/modified under "lib"; 1 files were created/modified under "tests"; 1 files were created/modified under "tests/tail"; ...
2002-Apr: 3 files were created/modified under "lib"; 2 files were created/modified under "tests/mkdir"; 2 files were created/modified under "man"; ...
2002-May: 1 files were created/modified under "doc"; 1 files were created/modified under "tests/misc"; 1 files were created/modified under "m4"; ...
2002-Jun: 6 files were created/modified under "lib"; 4 files were created/modified under "m4"; 2 files were created/modified under "config"; ...
2002-Jul: 220 files were created/modified under "tests/sort"; 121 files were created/modified under "tests/uniq"; 114 files were created/modified under "tests/tr"; ...
2002-Aug: 29 files were created/modified under "src"; 20 files were created/modified under "tests/pr"; 2 files were created/modified under "lib"; ...
2002-Sep: 15 files were created/modified under "m4"; 8 files were created/modified under "po"; 5 files were created/modified under "src"; ...
2002-Oct: 21 files were created/modified under "tests/cp"; 18 files were created/modified under "tests/mv"; 13 files were created/modified under "tests/rm"; ...
2002-Nov: 18 files were created/modified under "lib"; 5 files were created/modified under "src"; 1 files were created/modified under "po"; ...
2002-Dec: 20 files were created/modified under "lib"; 16 files were created/modified under "src"; 2 files were created/modified under "tests/ls"; ...
2003-Jan: 104 files were created/modified under "tests/cut"; 64 files were created/modified under "tests/date"; 22 files were created/modified under "lib"; ...
2003-Feb: 9 files were created/modified under "lib"; 6 files were created/modified under "src"; 5 files were created/modified under "m4"; ...
2003-Mar: 87 files were created/modified under "man"; 57 files were created/modified under "po"; 27 files were created/modified under "lib"; ...
2003-Apr: 44 files were created/modified under "tests"; 19 files were created/modified under ""; 7 files were created/modified under "doc"; ...

See also examples for GNU GCC archives: here.

All the files.

Install and run for Ubuntu:
sudo apt install racket
racket filetree_monthly_stat.rkt 

Or visit Racket website.

Only Linux was checked... It can ran on other OSes, but I'm not sure.


List of my other blog posts.