Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extracting .tar file isn't working

Thanks ahead of time for all your help guys! As a beginner user I really appreciate the help!


My Machine/OS: Mac OSX 10.5.8, 32-bit


What I'm trying to do: Extract and install Apache Maven, from the website.


What I've done: Downloaded the binary .tar.gz file from the website, and using the shell, moved the downloaded file to the appropariate directory, and extracted the .tar out of the .tar.gz by using gunzip -v filename.tar.gz, resulting a .tar file. Now I'm trying to extract the .tar file using tar -xv filename.tar.


My Problem The extraction doesn't seem to be working! After I've typed the tar -xv filename.tar command and hit enter, the shell isn't returning any output, and doesn't seem to complete the extraction. It stays indefinitely with the empty line returned after hitting enter.


My Attempts Examining the directory from another Shell window, both while tar is running and after quitting the shell while the process is running, doesn't show any changes in the files contained; i.e. the only file/directory present is the original .tar.gz file. I've also tried deleting the file along with the directory containing it, re-creating the directory, re-copying the file into the directory, and then re-trying the tar -xv filename.tar command. The result is the same


Thank you so much everyone!

like image 744
whearyou Avatar asked Jul 18 '12 19:07

whearyou


People also ask

How do I extract a .tar file?

Simply right-click the item you want to compress, mouseover compress, and choose tar. gz. You can also right-click a tar. gz file, mouseover extract, and select an option to unpack the archive.

Does unzip work on tar?

To extract (unzip) a tar. gz file simply right-click on the file you want to extract and select “Extract”. Windows users will need a tool named 7zip to extract tar.

Can 7-Zip extract tar files?

7-Zip can also be used to unpack many other formats and to create tar files (amongst others).

Can Windows 10 unzip tar files?

However, Windows 10 now includes native support for tar files, and you can use Command Prompt to extract these files. Or you can even use the Windows Subsystem for Linux (WSL) that includes native support for Ubuntu, Fedora, SUSE, and many other distros.


1 Answers

Try the following command:

gunzip -c filename.tar.gz | tar xopf -

After you tried gunzip, use tar xopf on that file

tar xopf filename.tar
like image 171
Ganesh prasad Avatar answered Sep 21 '22 03:09

Ganesh prasad