Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!mordor!sri-spam!sri-unix!hplabs!hpcea!hpda!hpirs!hpisod1!hpisoa1!decot From: decot@hpisoa1.HP.COM (Dave Decot) Newsgroups: comp.unix.questions Subject: Re: Unix Question Message-ID: <2040001@hpisoa1.HP.COM> Date: Thu, 13-Nov-86 18:06:26 EST Article-I.D.: hpisoa1.2040001 Posted: Thu Nov 13 18:06:26 1986 Date-Received: Sun, 16-Nov-86 01:38:39 EST References: <1843@tektools.UUCP> Lines: 45 >>> 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... The original respondant asked you to RTFM, and you apparently did not. The touch(1) command allows the owner of a file or the superuser to set the time(s) to *any* time: TOUCH(1) HP-UX TOUCH(1) NAME touch - update access, modification, and/or change times of file SYNOPSIS touch [ -amc ] [ mmddhhmm[yy] ] files DESCRIPTION Touch causes the access, modification, and last change 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). Dave Decot hpda!decot