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);
In reply to Re: tar sytem command
by tadman
in thread tar sytem command
by NodeReaper
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |