in reply to compressing VERY LARGE files
Don't give up on bzip2 or gzip just because they may not always be in the same place.
It may be simpler to write a routine to find the executable and run it than to get a module installed across all of those machines... If you can guarantee that at least gzip is on all the boxes, it shouldn't be too hard, in fact...
Not sure if that makes sense in your case, but I think it would work...sub findCompressor { my @paths=( "/usr/bin". "/bin", "/usr/local/bin", "/usr/share/bin", "/opt/bin", "$ENV{HOME}/bin", "$ENV{HOME}/local/bin", ); foreach my $prog('bzip2','gzip','compress') { foreach my $dir(@paths) { my $path="$dir/$prog"; return $path if -x $path; } } # return some default non-compressing compressor?? } # run once my $compressor=findCompress();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: compressing VERY LARGE files
by gnu@perl (Pilgrim) on Sep 26, 2002 at 20:14 UTC | |
by RMGir (Prior) on Sep 26, 2002 at 20:20 UTC | |
|
Re: Re: compressing VERY LARGE files
by duelafn (Parson) on Sep 27, 2002 at 13:26 UTC | |
by RMGir (Prior) on Sep 27, 2002 at 13:52 UTC |