OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / release / man2 / utime.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Modified by Michael Haardt <michael@moria.de>
26 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
27 .\" Modified 1995-06-10 by Andries Brouwer <aeb@cwi.nl>
28 .\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
29 .\" Modified 2004-10-10 by Andries Brouwer <aeb@cwi.nl>
30 .\"
31 .\" Japanese Version Copyright (c) 1997 SUTO, Mitsuaki
32 .\"         all rights reserved.
33 .\" Translated Thu Jun 26 21:28:00 JST 1997
34 .\"         by SUTO, Mitsuaki <suto@av.crl.sony.co.jp>
35 .\" Updated & Modified Tue Feb 15 03:21:17 JST 2005
36 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
37 .\" Updated 2006-07-21, Akihiro MOTOKI, LDP v2.36
38 .\" Updated 2007-10-13, Akihiro MOTOKI, LDP v2.65
39 .\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
40 .\"
41 .TH UTIME 2 2008-08-06 "Linux" "Linux Programmer's Manual"
42 .SH Ì¾Á°
43 utime, utimes \- ¥Õ¥¡¥¤¥ë¤ÎºÇ½ª¥¢¥¯¥»¥¹»þ¹ï¤È½¤Àµ»þ¹ï¤òÊѹ¹¤¹¤ë
44 .SH ½ñ¼°
45 .nf
46 .B #include <sys/types.h>
47 .br
48 .B #include <utime.h>
49 .sp
50 .BI "int utime(const char *" filename ", const struct utimbuf *" times );
51 .sp
52 .B #include <sys/time.h>
53 .sp
54 .BI "int utimes(const char *" filename ", const struct timeval " times [2]);
55 .fi
56 .SH ÀâÌÀ
57 .BR utime ()
58 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
59 .I filename
60 ¤Ç¼¨¤µ¤ì¤ë inode ¤Î¥¢¥¯¥»¥¹»þ¹ï¤È½¤Àµ»þ¹ï¤ò
61 .I times
62 Ãæ¤Î
63 .IR actime " ¤È " modtime
64 ¤Ë¤½¤ì¤¾¤ìÊѹ¹¤¹¤ë¡£
65
66 .I times
67 ¤¬
68 .B NULL
69 ¤Î¾ì¹ç¡¢¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹»þ¹ï¤È½¤Àµ»þ¹ï¤Ï¸½ºß¤Î»þ¹ï¤ËÀßÄꤵ¤ì¤ë¡£
70
71 ¥¿¥¤¥à¥¹¥¿¥ó¥×¤ÎÊѹ¹¤Ï°Ê²¼¤Î¤¤¤º¤ì¤«¤Î¾ì¹ç¤Ëµö²Ä¤µ¤ì¤ë¡£
72 ¥×¥í¥»¥¹¤ËŬÀÚ¤ÊÆø¢¤¬¤¢¤ë¾ì¹ç¡¢
73 ¼Â¸ú (effective) ¥æ¡¼¥¶ ID ¤¬¥Õ¥¡¥¤¥ë¤Î¥æ¡¼¥¶ ID ¤ÈÅù¤·¤¤¾ì¹ç¡¢
74 .I times
75 ¤¬ NULL ¤«¤Ä¡¢¥×¥í¥»¥¹¤¬¥Õ¥¡¥¤¥ë¤Ø¤Î½ñ¤­¹þ¤ßµö²Ä¤ò»ý¤Ã¤Æ¤¤¤ë¾ì¹ç¡£
76
77 ¹½Â¤ÂÎ
78 .I utimbuf
79 ¤Ï°Ê²¼¤Ë¼¨¤¹¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡£
80
81 .in +4n
82 .nf
83 struct utimbuf {
84     time_t actime;       /* ¥¢¥¯¥»¥¹»þ¹ï */
85     time_t modtime;      /* ½¤Àµ»þ¹ï */
86 };
87 .fi
88 .in
89
90 .BR utime ()
91 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï 1 ÉäÎʬ²òǽ¤Ç¥¿¥¤¥à¥¹¥¿¥ó¥×¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
92
93 .BR utimes ()
94 ¤Ï
95 .BR utime ()
96 ¤ÈƱÍͤǤ¢¤ë¤¬¡¢
97 .I times
98 °ú¤­¿ô¤¬¹½Â¤ÂΤǤϤʤ¯ÇÛÎó¤ò»²¾È¤¹¤ë¡£
99 ¤³¤ÎÇÛÎó¤ÎÍ×ÁǤÏ
100 .I timeval
101 ¹½Â¤ÂΤǡ¢¥¿¥¤¥à¥¹¥¿¥ó¥×¤Î»ØÄê¤ò 1 ¥Þ¥¤¥¯¥íÉäÎʬ²òǽ¤Ç¹Ô¤¦¤³¤È¤¬¤Ç¤­¤ë¡£
102 ¹½Â¤ÂÎ
103 .I timeval
104 ¤Ï°Ê²¼¤Ë¼¨¤¹Ä̤ê¤Ç¤¢¤ë¡£
105
106 .in +4n
107 .nf
108 struct timeval {
109     long tv_sec;        /* Éà*/
110     long tv_usec;       /* ¥Þ¥¤¥¯¥íÉà*/
111 };
112 .fi
113 .in
114 .PP
115 .IR times [0]
116 ¤Ï¿·¤·¤¤¥¢¥¯¥»¥¹»þ¹ï¤ò¡¢
117 .IR times [1]
118 ¤Ï¿·¤·¤¤½¤Àµ»þ¹ï¤òµ¬Äꤹ¤ë¡£
119 .I times
120 ¤¬ NULL ¤Î¾ì¹ç¡¢
121 .BR utime ()
122 ƱÍÍ¡¢¥Õ¥¡¥¤¥ë¤Î¥¢¥¯¥»¥¹»þ¹ï¤È½¤Àµ»þ¹ï¤Ï¸½ºß¤Î»þ¹ï¤ËÀßÄꤵ¤ì¤ë¡£
123 .SH ÊÖ¤êÃÍ
124 À®¸ù¤·¤¿¾ì¹ç 0 ¤¬Ê֤롣¼ºÇÔ¤·¤¿¾ì¹ç \-1 ¤¬Ê֤ꡢ
125 .I errno
126 ¤¬¥¨¥é¡¼¤ÎÆâÍƤ˽¾¤Ã¤ÆÀßÄꤵ¤ì¤ë¡£
127 .SH ¥¨¥é¡¼
128 .TP
129 .B EACCES
130 .I path
131 ¤ò¹½À®¤¹¤ë²¿¤ì¤«¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¸¡º÷µö²Ä¤¬¤Ê¤¤
132 .RB ( path_resolution (7)
133 ¤â»²¾È¤¹¤ë¤³¤È)¡£
134 .TP
135 .B EACCES
136 .I times
137 ¤¬ NULL ¤Ç¤¢¤ë¡£
138 ¤Þ¤¿¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¤Î¼Â¸ú¥æ¡¼¥¶ ID ¤¬¥Õ¥¡¥¤¥ë¤Î½êÍ­¼Ô¤È°ìÃפ·¤Ê¤¤¡£
139 ¤Þ¤¿¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¤¬¤½¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î½ñ¤­¹þ¤ßµö²Ä¤ò»ý¤¿¤º¡¢
140 Æø¢¤â»ý¤Ã¤Æ¤¤¤Ê¤¤ (Linux ¤Î¾ì¹ç¡¢¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£
141 .B CAP_DAC_OVERRIDE
142 ¤â
143 .B CAP_FOWNER
144 ¤â»ý¤Ã¤Æ¤¤¤Ê¤¤)¡£¤Þ¤¿¤Ï¡¢
145 .TP
146 .B ENOENT
147 .I filename
148 ¤¬Â¸ºß¤·¤Ê¤¤¡£
149 .TP
150 .B EPERM
151 .I times
152 ¤¬ NULL ¤Ç¤Ê¤¯¡¢¤«¤Ä¸Æ¤Ó½Ð¤·¸µ¤Î¼Â¸ú UID ¤¬¥Õ¥¡¥¤¥ë¤Î½êÍ­¼Ô¤È°ìÃפ»¤º¡¢
153 ¤«¤Ä¸Æ¤Ó½Ð¤·¸µ¤¬Æø¢¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤
154 (Linux ¤Î¾ì¹ç¡¢¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£
155 .B CAP_FOWNER
156 ¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤)¡£
157 .TP
158 .B EROFS
159 .I path
160 ¤¬Æɤ߹þ¤ßÀìÍѤΥե¡¥¤¥ë¥·¥¹¥Æ¥à¾å¤Ë¤¢¤ë¡£
161 .SH ½àµò
162 .BR utime ():
163 SVr4, POSIX.1-2001.
164 POSIX.1-2008 ¤Ï
165 .BR utime ()
166 ¤òÇÑ»ßͽÄê¤È¤·¤Æ¤¤¤ë¡£
167 .br
168 .BR utimes ():
169 4.3BSD, POSIX.1-2001.
170 .SH Ãí°Õ
171 Linux ¤Ç¤Ï¡¢ÉÔÊÑ (immutable) ¥Õ¥¡¥¤¥ë¤Î¥¿¥¤¥à¥¹¥¿¥ó¥×¤òÊѹ¹¤·¤¿¤ê¡¢
172 ÄɲÃÀìÍÑ (append-only) ¤Î¥Õ¥¡¥¤¥ë¤Ë¸½ºß»þ¹ï°Ê³°¤Î¥¿¥¤¥à¥¹¥¿¥ó¥×¤ò
173 ÀßÄꤷ¤¿¤ê¤¹¤ë¤³¤È¤Ï¡¢µö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
174
175 libc4 ¤È libc5 ¤Ç¤Ï¡¢
176 .BR utimes ()
177 ¤Ïñ¤Ë
178 .BR utime ()
179 ¤Î¥é¥Ã¥Ñ¡¼ (wrapper) ¤Ç¤¢¤ë¡£
180 ¤½¤Î¤¿¤áÉðʲ¼¤ò»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
181 .SH ´ØÏ¢¹àÌÜ
182 .BR chattr (1),
183 .BR futimesat (2),
184 .BR stat (2),
185 .BR utimensat (2),
186 .BR futimes (3),
187 .BR futimens (3)