The Linux kernel has had an
xstat(2) system call in the works for several years, now. David Howells of RedHat did much of the work.
xstat(2) allows one to retrieve the creation time (sometimes rechristened the "born time" or "birth time" in the Linux and BSD worlds for no really good reason) of files from the several filesystems that support it, including EXT4 (which has a creation timestamp on disc) and CIFS (which with its DOS/OS/2/Windows heritage has supported a creation timestamp as a first class citizen for decades). M. Howells worked on the CIFS patches that go along with the system call.
OpenSolaris and the BSDs actually do have a
st_birthtim datum in their
stat(2) system call right now, and the feature is accessible to script writers via application programs such as
ls. On the OpenSolaris
ls man page you'll find
ctime in several places. Similarly, the FreeBSD
find command has
-Btime primaries. And the Mac OS
ls has a
If you were writing your script for OpenSolaris, the BSDs, or Mac OS 10, you could just get on with whatever you want to do with creation times right now. Indeed if you were writing for Windows you could do the same. Cygwin has supported
st_birthtim since 2007, making Win32's
CreationTime timestamp, which it has had since the first version of Windows NT and which Windows NT maintains on both NTFS and FAT volumes, available to Cygwin tools.
However, the same isn't true in the GNU Linux world. Creation time capability has yet to make it to GNU coreutils'
ls or to GNU findutils'
find. Indeed, it isn't even part of the mainstream Linux kernel yet. Part of the problem is that the
xstat(2) system call got bogged down in a diversion where people wanted to keep three timestamps, instead of have four as in the Windows NT kernel API, and dump
ctime to replace it with
Linus Torvalds' response in 2010 was that "it's all totally useless and people can't even
agree on a name" and "Let's wait five years".
In fact, as I suspect most people reading this will know, the world has been widely agreeing the name "creation time" since the 1980s and we've been waiting at least 25 years already. It's the name used in OS/2 1.0; it's the name used in VMS ODS-1; it's the name used in Windows NT 3.5; it's the name used in SMB; and it's the name used in the question. ☺