Retaining file modification times

Phil Howard KA9WGN phil at ux1.cso.uiuc.edu
Sat May 25 14:55:24 AEST 1991


alex at am.sublink.org (Alex Martelli) writes:

>Other problems have to do with such commands as 'ti sort -ofo fi', where
>file 'fo' is going to be modified but is not easily recognizable as a
>part of the target command; also 'ti sort fi >fo', since the shell is
>not going to let ti know that its output is redirected to fo...

Also, ti can't catch the file names in programs that come up with their
own, such as in:

    ti find . -type f -exec touch {} \;

But I have found ti to be useful in transferring the date from one file
to another file with some handwaving from "mv".  Try:

    ti csh -fc 'mv a tmp;mv b a;mv tmp b' a b

>Anyway, the main way I use it is just as in the first example above -
>I definitely do NOT want source files' modtimes to be updated when
>they are just, conceptually, being checked-in, not 'modified'... such
>updates were impeding my intended usage of make+rcs before I came up
>with this kludgey but basically workable solution.

It might technically be a kludge, but I have found ti to be very useful.
-- 
 /***************************************************************************\
/ Phil Howard -- KA9WGN -- phil at ux1.cso.uiuc.edu   |  Guns don't aim guns at  \
\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks  |  people; CRIMINALS do!!  /
 \***************************************************************************/



More information about the Comp.unix.shell mailing list