Unix Question
Straka
straka at ihlpf.UUCP
Fri Nov 14 00:33:47 AEST 1986
> 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
...
> want; it will set the access and modify times to whatever you
> wish, and set the inode change time to the current time. See
> the manual entry.
> If you need to set the inode change time, you will have to
> fool with the raw disk device. If you really need to do so,
No, no, no. 'touch' provides the current time stamp as a *default*.
The syntax (at least on SVR2) for touch is:
touch [ -amc ] [ mmddhhmm[yy] ] files
where -a = access time stamp only
-m = modification time only
-c = don't create file if non-existent
This means that you can optionally set the stamp to "anything" you want to.
Yes, RTFM!
Rich Straka ihnp4!ihlpf!straka
More information about the Comp.unix.questions
mailing list