NetBSD/usr.bin/touch
kre b064b3fad8 Add a -D option to touch, which acts like the -d option added to
chmod/chown/chgrp (probably others) in the not too far distant past,
and causes the operation to be a no-op if no actual change would be
made (avoiding updating the file's ctime for no reason).

That is, with touch, -D causes no modifying sys call to be made to
a file if that file's atime and mtime are already set to the values
that would be used.   A common case for this is when a "-r ref-file"
is also a target file for the operation.

Unfortunately -d was already taken in touch, so next best available is -D.
2024-02-10 00:19:30 +00:00
..
Makefile Properly implement the POSIX format -d option. 2024-02-08 02:53:53 +00:00
touch.1 Add a -D option to touch, which acts like the -d option added to 2024-02-10 00:19:30 +00:00
touch.c Add a -D option to touch, which acts like the -d option added to 2024-02-10 00:19:30 +00:00