When I run gunzip -dc /path_to_tar.gz_file/zip1.tar.gz | tar xf - in the directory where the tar.gz file is located, it extracts just fine.How do I tell it to place the contents from the tar.gz file into a specific directory?I tried this gunzip -dc /path_to_tar.gz_file/zip1.tar.gz | tar xf /target_directory with a tar error.I should also note here that I am attempting to do this in a bash script and that I'm running Solaris 10.
How do I use gunzip and tar to extract my tar.gz file to the specific directory I want?
tar;gzip