touch (Was Re: -since option for ls -lt)
Russell Kent
kent at tifsie.UUCP
Fri Jun 24 10:17:31 AEST 1988
in article <712 at ubu.warwick.UUCP>, maujd at warwick.UUCP (Geoff Rimmer) says:
> In article <344 at ajpo.sei.cmu.edu> jrkelly at ajpo.sei.cmu.edu (John Kelly) writes:
>>
>>Has anyone implemented any of the following for Unix:
>>
>> 1. a directory listing command with a -since option?
>> 2. a program to force a specified modification time upon a specified file?
>> 3. a program to compare two dates/times and return an appropriate status?
>>
>>where the dates/times are given in string form, as in the output of "date" and
>>"ls"?
>
> #2 is already implemented on our (system V version) touch(1V) :-
As Geoff noted, SYSV touch allows you to set the date to a specific time,
whether future or past. BSD touch does not however. But then again, BSD
will "force" a touch (via an -f option) even if the file is not writable
(assuming you own the file or are the superuser). At my last check, SYSV
has no provision to do this (Clarification anyone?).
I got frustrated enough at the "gratuitous differences" between BSD
and SYSV on this point that I wrote my own. It is written entirely
without reference to BSD or SYSV source, but implements both features
from BSD and SYSV. If some kind soul will mail instructions on how
to distrubute via comp.unix.sources, I will share. For those of you
who can't wait, send me mail and I will email directly.
John Kelly: I would have emailed the source directly to you, but my mailer
doesn't know how to get to you. (Dumb ain't it) If you can come up with
a bang-style address, I'll send it to you.
Russell Kent Phone: +1 214 995 3501
Texas Instruments UUCP address:
P.O. Box 655012 MS 3635 ...!convex!smu!tifsie!kent
Dallas, TX 75265 ...!ut-sally!im4u!ti-csl!tifsie!kent
--
Russell Kent Phone: +1 214 995 3501
Texas Instruments UUCP address:
P.O. Box 655012 MS 3635 ...!convex!smu!tifsie!kent
Dallas, TX 75265 ...!ut-sally!im4u!ti-csl!tifsie!kent
More information about the Comp.unix.questions
mailing list