Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!cbatt!cbuxc!cbuxb!cbrma!ask From: ask@cbrma.UUCP (A.S.Kamlet) Newsgroups: comp.unix.questions Subject: Re: Unix Question Message-ID: <5387@cbrma.UUCP> Date: Wed, 12-Nov-86 16:22:15 EST Article-I.D.: cbrma.5387 Posted: Wed Nov 12 16:22:15 1986 Date-Received: Thu, 13-Nov-86 04:01:31 EST References: <249@sjuvax.UUCP> <808@mtund.UUCP> <4287@umcp-cs.UUCP> Reply-To: ask@cbrma.UUCP (A.S.Kamlet(Art)) Distribution: net Organization: AT&T Bell Laboratories Lines: 31 In article <4287@umcp-cs.UUCP> steve@umcp-cs.UUCP (Steve D. Miller) writes: >In article <808@mtund.UUCP> adam@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