Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!umcp-cs!steve From: steve@umcp-cs.UUCP (Steve D. Miller) Newsgroups: comp.unix.questions Subject: Re: Unix Question Message-ID: <4287@umcp-cs.UUCP> Date: Tue, 11-Nov-86 09:23:28 EST Article-I.D.: umcp-cs.4287 Posted: Tue Nov 11 09:23:28 1986 Date-Received: Tue, 11-Nov-86 20:12:36 EST References: <249@sjuvax.UUCP> <808@mtund.UUCP> Reply-To: steve@umcp-cs.UUCP (Steve D. Miller) Distribution: net Organization: U of Maryland, Laboratory for Parallel Computation, C.P., MD Lines: 31 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. -Steve -- Spoken: Steve Miller ARPA: steve@mimsy.umd.edu Phone: +1-301-454-4251 CSNet: steve@umcp-cs UUCP: {seismo,allegra}!umcp-cs!steve USPS: Computer Science Dept., University of Maryland, College Park, MD 20742