Retaining file modification times
Leslie Mikesell
les at chinet.chi.il.us
Sun May 26 12:13:53 AEST 1991
In article <9105211828.AA12327 at fozzie.nrl.navy.mil> phillips at FOZZIE.NRL.NAVY.MIL (Lee Phillips) writes:
>I want to do something to a file without changing its modification
>time. I suppose I can write a script to get the time from ls, do the
>modification, then restore the time (after converting it to numerical
>format) with /usr/5bin/touch, but I'm hoping that there is an easier
>way. (Csh solutions preferred.)
Perl is probably the only utility that has stat and utime implimented
in a way that is directly usable. Other choices would requre C programming
or lots of contortions.
Les Mikesell
les at chinet.chi.il.us
More information about the Comp.unix.shell
mailing list