xref: /titanic_50/usr/src/lib/libast/common/man/touch.3 (revision 174bc6499d233e329ecd3d98a880a7b07df16bfa)
.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.