Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!rutgers!sri-spam!sri-unix!hplabs!tektronix!tekgen!tektools!jerryp From: jerryp@tektools.UUCP (Jerry Peek) Newsgroups: comp.unix.questions Subject: Re: Unix Question Message-ID: <1843@tektools.UUCP> Date: Mon, 10-Nov-86 11:44:42 EST Article-I.D.: tektools.1843 Posted: Mon Nov 10 11:44:42 1986 Date-Received: Tue, 11-Nov-86 09:16:26 EST References: <249@sjuvax.UUCP> Reply-To: jerryp@tektools.UUCP (Jerry Peek) Distribution: net Organization: Tektronix, Inc., Beaverton, OR. Lines: 38 In article <249@sjuvax.UUCP> cc743805@sjuvax.UUCP (conway) writes: > How can one change the date/time stamp of a file? If you can write the C code, use utimes(2) and/or utime(3). I have a program named "setd" that someone else here at Tek wrote; it does just what you want. It runs on BSD VAXen; I dunno about Sys V or other OS'es. If anyone wants a copy, let me know -- I should ask the author's permission first, but I don't think it'd be any problem. Here's part of the man page: setd(1) UNIX Programmer's Manual setd(1) NAME setd - Sets file(s) date/time to desired time. SYNOPSIS setd [+ma] [-[mm/dd/yy][,hh:mm:ss]] file1 [file2] ... DESCRIPTION This program will let you change the date/time on any file to exactly the date that you want. Allowable dates are from January 1, 1980 to December 31, 2037. The program uses the utime() call from C. This always updates the last inode changed time (sometimes called the creation time). The modification and last access times are updated to the specified time unless the options '+m' or '+a' are specified. If '+m' is specified, only the modifica- tion time on the file is changed. If '+a' is specified, only the last access time on the file is changed. If '+' is specified without any arguments, neither the last access or modification times are changed, but the last inode-changed time is updated to the current time. --Jerry Peek, Tektronix, Inc. US Mail: MS 74-900, P.O. Box 500, Beaverton, OR 97077 uucp: {allegra,decvax,hplabs,ihnp4,ucbvax}!tektronix!tektools!jerryp CS,ARPAnet: jerryp%tektools@tektronix.csnet Phone: +1 503 627-1603