version 1.1.1.1, 1993/03/21 09:45:37 |
version 1.1.1.2, 1995/02/25 09:13:16 |
|
|
.\" Copyright (c) 1980, 1991 Regents of the University of California. |
.\" Copyright (c) 1980, 1991, 1993 |
.\" All rights reserved. |
.\" The Regents of the University of California. All rights reserved. |
.\" |
.\" |
.\" Redistribution and use in source and binary forms, with or without |
.\" Redistribution and use in source and binary forms, with or without |
.\" modification, are permitted provided that the following conditions |
.\" modification, are permitted provided that the following conditions |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
.\" SUCH DAMAGE. |
.\" SUCH DAMAGE. |
.\" |
.\" |
.\" @(#)utime.3 6.3 (Berkeley) 4/19/91 |
.\" @(#)utime.3 8.1 (Berkeley) 6/4/93 |
.\" |
.\" |
.Dd April 19, 1991 |
.Dd June 4, 1993 |
.Dt UTIME 3 |
.Dt UTIME 3 |
.Os BSD 4 |
.Os BSD 4 |
.Sh NAME |
.Sh NAME |
|
|
.Nd set file times |
.Nd set file times |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Fd #include <sys/types.h> |
.Fd #include <sys/types.h> |
|
.Fd #include <utime.h> |
.Ft int |
.Ft int |
.Fn utime "const char *file" "const struct utimbuf *timep" |
.Fn utime "const char *file" "const struct utimbuf *timep" |
.Sh DESCRIPTION |
.Sh DESCRIPTION |
.Bf -symbolic |
.Bf -symbolic |
This interface is obsoleted by utimes(2) . |
This interface is obsoleted by utimes(2) . |
It is available from the compatibility library, libcompat. |
|
.Ef |
.Ef |
.Pp |
.Pp |
.Sh DESCRIPTION |
|
The |
The |
.Fn utime |
.Fn utime |
function sets the access and modification times of the named file from |
function sets the access and modification times of the named file from |
the structures in the argument array |
the structures in the argument array |
.Fa timep . |
.Fa timep . |
.Pp |
.Pp |
The calling process's effective user ID must match the owner of the |
If the times are specified (the |
file or must be the super-user. |
.Fa timep |
|
argument is |
|
.Pf non- Dv NULL ) |
|
the caller must be the owner of the file or be the super-user. |
|
.Pp |
|
If the times are not specified (the |
|
.Fa timep |
|
argument is |
|
.Dv NULL ) |
|
the caller must be the owner of the file, have permission to write |
|
the file, or be the super-user. |
|
.Sh ERRORS |
|
The |
|
.Fn utime |
|
function may fail and set |
|
.Va errno |
|
for any of the errors specified for the library function |
|
.Xr utimes 2 . |
.Sh SEE ALSO |
.Sh SEE ALSO |
.Xr utimes 2 , |
.Xr utimes 2 , |
.Xr stat 2 |
.Xr stat 2 |
|
|
.Fn utime |
.Fn utime |
function appeared in |
function appeared in |
.At v7 . |
.At v7 . |
|
.Sh STANDARDS |
|
The |
|
.Nm utime |
|
function conforms to |
|
.St -p1003.1-88 . |