Linux Manual Pages development
 help / color / mirror / Atom feed
* [PATCH] utime.2, utimensat.2: explicitly mention ctime changing.
@ 2022-08-24  1:21 NeilBrown
  2022-08-24 10:15 ` Jeff Layton
  0 siblings, 1 reply; 6+ messages in thread
From: NeilBrown @ 2022-08-24  1:21 UTC (permalink / raw)
  To: Michael Kerrisk, linux-man; +Cc: Jeff Layton


utime and related calls always change the ctime.  It is worth making
this explicit.
This is clear from the code (vfs_utimes() in fs/utimes.c always sets
ATTR_CTIME) and is documented in
  https://pubs.opengroup.org/onlinepubs/007904875/functions/utimes.html

Signed-off-by: NeilBrown <neilb@suse.de>
---
 man2/utime.2     | 2 ++
 man2/utimensat.2 | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/man2/utime.2 b/man2/utime.2
index 5338723574e2..7557d680afa3 100644
--- a/man2/utime.2
+++ b/man2/utime.2
@@ -39,6 +39,8 @@ to the
 fields of
 .I times
 respectively.
+The status change time (ctime) will be set to the current time, even if the
+other time stamps don't actually change.
 .PP
 If
 .I times
diff --git a/man2/utimensat.2 b/man2/utimensat.2
index 11cf3ee24129..2abf8e196ee1 100644
--- a/man2/utimensat.2
+++ b/man2/utimensat.2
@@ -101,6 +101,9 @@ If
 .I times
 is NULL, then both timestamps are set to the current time.
 .\"
+.PP
+The status change time (ctime) will be set to the current time, even if the
+other time stamps don't actually change.
 .SS Permissions requirements
 To set both file timestamps to the current time (i.e.,
 .I times
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-25 11:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-24  1:21 [PATCH] utime.2, utimensat.2: explicitly mention ctime changing NeilBrown
2022-08-24 10:15 ` Jeff Layton
2022-08-24 11:49   ` Alejandro Colomar
2022-08-25  0:20     ` NeilBrown
2022-08-25  8:37       ` Jakub Wilk
2022-08-25 11:19         ` Alejandro Colomar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox