From bc3707e75bc710532fc68e9679362bd40d95771f Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Thu, 27 May 1993 14:28:42 +0000 Subject: [PATCH] gzip 1.3.5 --- sample/ztouch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 sample/ztouch diff --git a/sample/ztouch b/sample/ztouch new file mode 100755 index 0000000..e408e2b --- /dev/null +++ b/sample/ztouch @@ -0,0 +1,15 @@ +#! /usr/local/bin/perl +# Set the time stamp of a gzip'ed file from that stored in the file. +# usage: ztouch files... + +foreach $file (@ARGV) { + open (FILE, $file); + read (FILE, $_, 8); + ($magic, $method, $flags, $time) = unpack ("A2C2V", $_); + if ($magic eq "\037\213") { + utime ($time, $time, $file); + } + else { + warn "$file is not compressed with gzip!\n"; + } +} -- 2.47.2