Unix Question
A.S.Kamlet
ask at cbrma.UUCP
Thu Nov 13 07:22:15 AEST 1986
In article <4287 at umcp-cs.UUCP> steve at umcp-cs.UUCP (Steve D. Miller) writes:
>In article <808 at mtund.UUCP> adam at mtund.UUCP (Adam V. Reed) writes:
>>> I'll make this short and sweet:
>>>
>>> How can one change the date/time stamp of a file?
>>>
>>> I want to be able to put any date/time on a file that I
>>> have in my directory...
>>> Chuck Conway
>>
>>See touch(1) in the User Reference Manual (RTFM!).
>
> The original poster does not want to put the *current* time on
>the file...he wants to put *any* time on the file. There are three
>timestamps associated with any file: the last access time, the
>last modify time, and the "last time inode modified" time (the
>a_time, m_time, and c_time fields of the structure returned by
>stat(2)). The utimes(2) system call is probably the one you
>want; it will set the access and modify times to whatever you
>wish, and set the inode change time to the current time. See
>the manual entry.
>
> If you need to set the inode change time, you will have to
>fool with the raw disk device. If you really need to do so,
>I can probably scrounge up more information for you.
>
According to my SVR2 manual, touch(1) can be used to change the access
and/or modification times to current time (default) or to an optional
time.
--
Art Kamlet AT&T Bell Laboratories Columbus {cbosgd | ihnp4}!cbrma!ask
More information about the Comp.unix.questions
mailing list