xref: /titanic_51/usr/src/lib/libast/common/man/touch.3 (revision bbaa8b60dd95d714741fc474adad3cf710ef4efd)
.fp 5 CW .. .nr ;G \\n(.f .Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" \\*(;G .. .aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" ..

0

..

..

TOUCH 3
NAME
touch - set file access and modify times
SYNOPSIS
.L "#include <ast.h>" .L "int touch(const char* path, time_t atime, time_t mtime, int force);"
DESCRIPTION
.L touch sets the access and modify times of the file named by .LR path . If .L "force != 0" then the file is created if it doesn't exist; otherwise the file is not created and .L -1 is returned. If .L "force < 0" then .L atime and .L mtime are taken verbatim; otherwise .L "(time_t)(-1)" retains the current value for the file and .L "(time_t)(0)" uses the current time.
CAVEATS
By default the change time is always changed to the current time.