Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!styx!mordor!sri-spam!sri-unix!rutgers!clyde!burl!codas!mtune!mtund!adam From: adam@mtund.UUCP (Adam V. Reed) Newsgroups: comp.unix.questions Subject: Re: Re: Unix Question Message-ID: <810@mtund.UUCP> Date: Thu, 13-Nov-86 22:18:23 EST Article-I.D.: mtund.810 Posted: Thu Nov 13 22:18:23 1986 Date-Received: Fri, 14-Nov-86 07:55:01 EST References: <249@sjuvax.UUCP> <808@mtund.UUCP> <4287@umcp-cs.UUCP> Distribution: net Organization: AT&T ISL Middletown NJ USA Lines: 38 Steve 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. RTFM, and I mean it: TOUCH(1) UNIX System V TOUCH(1) NAME touch - update access and modification times of a file SYNOPSIS touch [ -amc ] [ mmddhhmm[yy] ] files DESCRIPTION Touch causes the access and modification times of each argument to be updated. The file name is created if it does not exist. If no time is specified (see date(1)) the current time is used. The -a and -m options cause touch to update only the access or modification times respectively (default is -am). The -c option silently prevents touch from creating the file if it did not previously exist. The return code from touch is the number of files for which the times could not be successfully modified (including files that did not exist and were not created). SEE ALSO date(1). utime(2) in the UNIX System Programmer Reference Manual. And yes, I tested it with an arbitrary date. It works. Adam Reed (mtund!adam)