in reply to tar sytem command
That's generic, and should do the job for you.my $archive = "/some/dir/archive.tar.gz"; # Split the filename off of the directory using a regular expression my ($dir, $filename) = $archive =~ m#^(.*)/([^/]+)$#; # Switch in to the directory with the archive chdir($dir) || die "Invalid path $dir\n"; # Extract the archive using 'tar' system("tar","-xvzf",$filename);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: tar sytem command
by grantm (Parson) on Oct 29, 2002 at 07:22 UTC | |
by tadman (Prior) on Oct 29, 2002 at 07:38 UTC | |
by grantm (Parson) on Oct 29, 2002 at 18:01 UTC |