[kwlug-disc] Reminder: bash's find has option -exec

Ron ron at bclug.ca
Wed Nov 12 05:15:26 EST 2025


Ron wrote on 2025-11-12 02:01:

> directories' "changed" time changes when running this script -
> quite annoying!  Requires a follow-up post: `find` does *not*
> recognize birth (creation) times.
So this seems kinda crazy to me:

First, `find` does not return creation, aka "birth" times on files:

## %B is "birth" / creation time:
$ find . -maxdepth 1 -name "find*" -printf "%BH:%BM:%BS %p\n"
:: ./find_sorted.sh

## %T is "mtime" / modification time:
$ find . -maxdepth 1 -name "find*" -printf "%TH:%TM:%TS %p\n"
01:59:29.8464477250 ./find_sorted.sh

We can see that the first example shows a time of "::" because the birth 
time isn't returned.



Yet it's supported by the file system:

$ stat  find_sorted.sh
   File: find_sorted.sh
   Size: 2031            Blocks: 8          IO Block: 4096   regular file
Device: 252,0   Inode: 4861485     Links: 1
Access: (0764/-rwxrw-r--)  Uid: ( 1000/    uid1)   Gid: ( 1000/    uid1)
Access: 2025-11-12 01:59:33.021178514 -0800
Modify: 2025-11-12 01:59:29.846447725 -0800
Change: 2025-11-12 01:59:29.846447725 -0800
  Birth: 2025-04-16 13:09:12.463542025 -0700


An up-to-date version (4.9.10 is out but not in Ubuntu repos):

$ find --version
find (GNU findutils) 4.9.0


Any idea why this is or any thoughts?




More information about the kwlug-disc mailing list