Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/touch



Module Name:    src
Committed By:   kre
Date:           Sat Feb 10 00:19:30 UTC 2024

Modified Files:
        src/usr.bin/touch: touch.1 touch.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/touch/touch.1
cvs rdiff -u -r1.39 -r1.40 src/usr.bin/touch/touch.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index