Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!mcvax!diku!olamb!kimcm From: kimcm@olamb.UUCP (Kim Chr. Madsen) Newsgroups: comp.unix.questions Subject: Re: How do I set a file's creation date? Message-ID: <293@olamb.UUCP> Date: Fri, 3-Jul-87 05:35:12 EDT Article-I.D.: olamb.293 Posted: Fri Jul 3 05:35:12 1987 Date-Received: Sat, 4-Jul-87 17:50:49 EDT References: <4280@caip.rutgers.edu> <1582@sfsup.UUCP> Organization: AmbraSoft A/S (Denmark) Lines: 23 In article <1582@sfsup.UUCP>, mpl@sfsup.UUCP writes: > > UNIX(R) does not keep a creation time! Do you mean the "ctime" field of > the stat struct? That is the modification time of the i-node (change > time). This is updated by chmod, write, or just about anything you do. > You *can't* explicitly set this, as far as I know. Some UNIX systems does however provide touch(1) with the option of setting a specified timestamp, and for the appropiate time entries in the inode information (atime, mtime and ctime). If your UNIX systems doesn't support this feature the solution is to write the utility which can be done quite simple (supposing you have access to root priviledges) by following the following sceme: read date and time set UNIX time touch the file (in a way so only the wanted times are affected) reset the UNIX time Kim Chr. Madsen