# Utility to set file birth/creation date?



## sean137 (Aug 25, 2019)

I'm looking for a utility that can set a file's birth/creation date.  From C, I could use futimens() or utimensat(), but I'm hoping for something I can use from the shell.  It seems 'touch' is not able to set birth time, only modification and access times; and 'stat' can get birth time, but not set it.  I've spent and hour searching, but I'm just not finding anything, so have joined this forum.

Thanks. Sean.


----------



## Beastie (Aug 25, 2019)

Welcome to the forums.

What you're asking is quite problematic as you can see in this very recent thread.


----------



## sean137 (Aug 26, 2019)

Darn, I did not find that thread I think because I searched for only "st_birthtime" but not "st_birthtim".

Well, from that thread, futimens() seems my only choice.  I think fsdb doesn't support ZFS, so that's not an option for me.


----------

