utimes man page on 4.4BSD

Man page or keyword search:  
man Server   1065 pages
apropos Keyword Search (all sections)
Output format
4.4BSD logo
[printable version]

UTIMES(2)		    BSD System Calls Manual		     UTIMES(2)

     utimes — set file access and modification times

     #include <sys/time.h>

     utimes(const char *file, const struct timeval *times);

     The utimes() function sets the access and modification times of the named
     file from the structures in the argument array times.

     The first structure is the access time, and the second is the modifica‐
     tion time.

     If the times are specified (the times argument is non-NULL) the caller
     must be the owner of the file or be the super-user.

     If the times are not specified (the times argument is NULL) the caller
     must be the owner of the file, have permission to write the file, or be
     the super-user.

     Upon successful completion, a value of 0 is returned.  Otherwise, a value
     of -1 is returned and errno is set to indicate the error.

     Utimes() will fail if:

     [EACCES]		Search permission is denied for a component of the
			path prefix; or the times argument is NULL and the
			effective user ID of the process does not match the
			owner of the file, and is not the super-user, and
			write access is denied.

     [EFAULT]		File or times points outside the process's allocated
			address space.

     [EINVAL]		The pathname contains a character with the high-order
			bit set.

     [EIO]		An I/O error occurred while reading or writing the
			affected inode.

     [ELOOP]		Too many symbolic links were encountered in translat‐
			ing the pathname.

     [ENAMETOOLONG]	A component of a pathname exceeded 255 characters, or
			an entire path name exceeded 1023 characters.

     [ENOENT]		The named file does not exist.

     [ENOTDIR]		A component of the path prefix is not a directory.

     [EPERM]		The times argument is not NULL and the calling
			process's effective user ID does not match the owner
			of the file and is not the super-user.

     [EROFS]		The file system containing the file is mounted read-


     The utimes function call appeared in 4.2BSD.

4th Berkeley Distribution	 June 4, 1993	     4th Berkeley Distribution

List of man pages available for 4.4BSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net