Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've downloaded mongodb-linux-x86_64-2.6.3.tgz file using windows 7 and kept it on D:\Amra\Software\Developing Soft location.

When I right click this .tgz file using Ubuntu and see property it shows Location: /media/towhid/Amra/Software/Developing Soft. Now how will I unzip this .tgz file using tar command from terminal?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

To extract a .tgz file with tar you need to use,

tar -xvzf /path/to/yourfile.tgz

where,

  • x for extract
  • v for verbose
  • z for gnuzip
  • f for file, should come at last just before file name.

You can use the following command in a terminal to unzip the file in your case,

tar -xvzf /media/towhid/Amra/Software/Developing\ Soft/mongodb-linux-x86_64-2.6.3.tgz
share|improve this answer
    
It shows following error: tar (child): /media/towhid/Amra/Software/Developing: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now –  Towhid Jul 19 at 8:25
    
you just copy my command, there is a syntax error with white space in your command. –  souravc Jul 19 at 8:27
1  
if a folder name is some folder, you need to access it from a terminal as some\ folder using escape character. –  souravc Jul 19 at 8:30
1  
This is very clear answer where answerer give complete explanation in every option. And a plus given for the example. Very understandable. –  Ade Malsasa Akbar Jul 19 at 8:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.