file-birth-time · shipping · also btime, Birth time, File creation time

File birth time

File birth time (btime) is a filesystem timestamp recording file creation, distinct from modification time and inode change time.

On Linux, stat() does not return btime. statx(), available since Linux 4.11 and glibc 2.28, can return it as stx_btime, with a signed 64-bit seconds field and an unsigned 32-bit nanoseconds field. Request STATX_BTIME and check that the returned stx_mask contains STATX_BTIME before interpreting the value, because a successful call does not guarantee that every requested field was supplied. [2]

When a filesystem cannot supply a field, the kernel clears its bit in stx_mask even if it was requested and may fill in a dummy value, so a nonzero stx_btime is not evidence on its own. STATX_ALL, which bundled STATX_BTIME with the basic fields, is deprecated. [2]

Birth time is set when the file is created and is not changed afterwards. It was not historically present on UNIX systems, and most Linux filesystems do not support it. Availability depends on the kernel and filesystem. Do not substitute ctime for missing birth time. On filesystems without subsecond timestamps the nanosecond field reads as 0. [1]

Relations

related
Inode, File modification time, Inode change time, File access time

Advantages

  • Separates recorded file creation from later content and inode-status changes. [1]

Limitations

  • Different statx fields may reflect different moments during a single call, so btime and other fields are not one atomic snapshot. [2]
  • Setting the request mask to all bits is discouraged because future bits may extend the returned buffer. [2]

Citations

  1. Linux man-pages 6.19: inode(7), file timestamps (accessed 2026-10-23)
  2. Linux man-pages 6.19: statx(2), requested and returned fields (accessed 2026-10-23)

Further reading

  1. Hesela: interpreting file timestamps during rsync selection (accessed 2026-10-21)
Sources & caveats
  • linux-statx is the Linux man-pages 6.19 statx(2) page, re-read for stx_btime, stx_mask semantics, the timestamp structure and history.
  • linux-inode is the Linux man-pages 6.19 inode(7) page, re-read for the btime description and nanosecond timestamp support.
  • The rsync-quick-check entry links here because its size and modification-time comparison does not use birth time.

JSON: /data/terms/file-birth-time.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. File birth time. Hesela. 2026-10-23. https://hesela.dev/terms/file-birth-time/