文件操作 - gzcat
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/doc/perl-IO-Compress/io/gzip/gzcat
编辑文件内容
#!/usr/bin/perl use IO::Uncompress::Gunzip qw( $GunzipError ); use strict ; use warnings ; #die "Usage: gzcat file...\n" # unless @ARGV ; my $file ; my $buffer ; my $s; @ARGV = '-' unless @ARGV ; foreach $file (@ARGV) { my $gz = new IO::Uncompress::Gunzip $file or die "Cannot open $file: $GunzipError\n" ; print $buffer while ($s = $gz->read($buffer)) > 0 ; die "Error reading from $file: $GunzipError\n" if $s < 0 ; $gz->close() ; }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件