[tex-live] help with unzip and sh and wildcards

Karl Berry karl at freefriends.org
Sat Mar 22 09:38:09 CET 2003

    feature I wanted is th -o option of zip which allows to set the date of
    the archive to the date of the most recent file in it. 

True enough, there's no option for that.  It would be pretty un-unixy.
Doesn't make sense with output to stdout, either.

Anyway, it can always be done after the fact (SIAK):
1) find the newest file (need GNU find):
latest=`find "$@" -type f -printf "%T@ %p\n" \
        | sort -nr | head -1 | awk '{print $2}'`

2) change the archive to have the times of that file:
touch -r $latest whatever.tar.gz

    have a look at 'zip' ones : they are quite different.

Very true.

FWIW ...

More information about the tex-live mailing list