|
|
1.1 ! root 1: .\" Copyright (c) 1980 Regents of the University of California. ! 2: .\" All rights reserved. The Berkeley software License Agreement ! 3: .\" specifies the terms and conditions for redistribution. ! 4: .\" ! 5: .\" @(#)utimes.2 6.5 (Berkeley) 9/30/87 ! 6: .\" ! 7: .TH UTIMES 2 "September 30, 1987" ! 8: .UC 4 ! 9: .SH NAME ! 10: utimes \- set file times ! 11: .SH SYNOPSIS ! 12: .nf ! 13: .ft B ! 14: #include <sys/time.h> ! 15: .PP ! 16: .ft B ! 17: utimes(file, tvp) ! 18: char *file; ! 19: struct timeval tvp[2]; ! 20: .fi ! 21: .SH DESCRIPTION ! 22: The ! 23: .I utimes ! 24: call ! 25: uses the ! 26: \*(lqaccessed\*(rq and \*(lqupdated\*(rq times in that order ! 27: from the ! 28: .I tvp ! 29: vector ! 30: to set the corresponding recorded times for ! 31: .I file. ! 32: .PP ! 33: The caller must be the owner of the file or the super-user. ! 34: The \*(lqinode-changed\*(rq time of the file is set to the current time. ! 35: .SH "RETURN VALUE ! 36: Upon successful completion, a value of 0 is returned. ! 37: Otherwise, a value of \-1 is returned and ! 38: .I errno ! 39: is set to indicate the error. ! 40: .SH "ERRORS ! 41: .I Utimes ! 42: will fail if one or more of the following are true: ! 43: .TP 15 ! 44: [ENOTDIR] ! 45: A component of the path prefix is not a directory. ! 46: .TP 15 ! 47: [EINVAL] ! 48: The pathname contains a character with the high-order bit set. ! 49: .TP 15 ! 50: [ENAMETOOLONG] ! 51: A component of a pathname exceeded 255 characters, ! 52: or an entire path name exceeded 1023 characters. ! 53: .TP 15 ! 54: [ENOENT] ! 55: The named file does not exist. ! 56: .TP 15 ! 57: [ELOOP] ! 58: Too many symbolic links were encountered in translating the pathname. ! 59: .TP 15 ! 60: [EPERM] ! 61: The process is not super-user and not the owner of the file. ! 62: .TP 15 ! 63: [EACCES] ! 64: Search permission is denied for a component of the path prefix. ! 65: .TP 15 ! 66: [EROFS] ! 67: The file system containing the file is mounted read-only. ! 68: .TP 15 ! 69: [EFAULT] ! 70: .I File ! 71: or \fItvp\fP points outside the process's allocated address space. ! 72: .TP 15 ! 73: [EIO] ! 74: An I/O error occurred while reading or writing the affected inode. ! 75: .SH SEE ALSO ! 76: stat(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.