Unix Question

Brent Chapman chapman at eris.BERKELEY.EDU
Sun Nov 16 09:22:06 AEST 1986


In article <850 at ihlpf.UUCP> straka at ihlpf.UUCP (Straka) writes:
>> In article <808 at mtund.UUCP> adam at mtund.UUCP (Adam V. Reed) writes:
>> >>      How can one change the date/time stamp of a file?
>> >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
>  ...
>No, no, no. 'touch' provides the current time stamp as a *default*.
>The syntax (at least on SVR2) for touch is:

Key words in the above "solution": "for SVR2"...

Unfortunately, 4BSD's 'touch' program doesn't provide this functionality.

(Yet again, folks: when you ask a question, PLEASE state which version of
UNIX you're using, what hardware, and anything else that may be useful.
Remember, "All versions of UNIX are equal, but some are more equal than
others."  We now return you to our regularly scheduled program...)

Under 4BSD, you need to use either the 'utime()' or the 'utimes()' call.
You'll need to look up the details of both in the manual, and decide which
one to use.


Brent
--
Brent Chapman

chapman at eris.berkeley.edu	or	ucbvax!eris!chapman



More information about the Comp.unix.questions mailing list