inode_set_ctime(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… inode_set_ctime β€” a Kernel API Manual moment (that's the manual name bestie, section 9, we're in kernel-land)

okay so picture this: you're deep in the kernel, you've got an inode, and its ctime is just... not it. you need to fix it. that's the whole vibe of this page. it's inode_set_ctime, and it does exactly one (1) thing and does it flawlessly. main character energy fr fr πŸŽ€


✨ SYNOPSIS ✨

struct timespec64 inode_set_ctime (struct inode *inode , time64_t sec ,
long nsec );

so like, it hands you back a struct timespec64, cute of it. takes three things, gives you one back. balanced. iconic. πŸ’–


🌸 ARGUMENTS 🌸

  • inode β€” the inode you're setting the ctime on, obviously. the target. the chosen one. 🫢
  • sec β€” the tv_sec value you wanna set. the big seconds. the whole-number part of the story.
  • nsec β€” the tv_nsec value you wanna set. the lil nanoseconds, the fine print, the sparkle on top ✨

πŸ’« DESCRIPTION πŸ’«

okay so the actual deal: it sets the ctime in inode to { sec, nsec }. that's it. that's the function. no hidden lore, no side quests, no plot twists. you give it an inode and a time, it puts the time in the inode. slay.

ngl the simplicity is the point here β€” it's giving "i do one job and i do it well" and honestly? we respect it. πŸ‘‘

lowkey a reminder that sec and nsec are the two halves of one timestamp β€” tv_sec and tv_nsec β€” and they go in together as { sec, nsec }. don't split them up bestie, they're a package deal πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

if you liked this one, the whole friend group lives over in the kernel file ./include/linux/fs.h β€” go say hi, they're all linked together, it's a whole ecosystem:

twenty-eight whole besties. iykyk 🌈


aaaand that's the page!! 🧚 no cap, this one was short and sweet and i ate. this lil gem lives in ./include/linux and the version date is stamped October 2026 β€” so if you're reading this in october 2026, hi, you're right on time, hope your ctime is immaculate πŸ’œπŸ“

k byeee, go set some timestamps responsibly bestie πŸ’…β­
πŸ“¦ where this page comes from