/
niceSOFT
/
gzip
Обзор
Документация
Войти
/
niceSOFT
/
gzip
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
sample/ztouch
15 строк
397 B
Jim Meyering
maint: change "time stamp" to "timestamp" globally
06 фев 2017, 21:13
06 фев 2017, 21:13
e914d16
Код
Авторство
О чём код?
#! /usr/local/bin/perl # Set the timestamp 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"; } }