Ubuntu: untar tar.gz doesn't work


I made an archive example.tar.gz at desktop. When I code like in desktop dir:

tar -zxvf example.tar.gz  

The output is etc/passwd(the file I archieved) and then

ls -al  

example.tar.gz is still there. How can I extract this?


The default is that tar removes the first slash (/) in order to avoid overwriting important files by mistake. It uses a local path instead. Maybe this behaviour makes you confused.

Did you check if the file etc/passwd exists? This is a local path (seen from the current directory), so use the command

ls -l etc/passwd  

or if you wish

find . -name passwd  

In other words, I think that 'untar' worked for you. The problem is probably, that you have not found the extracted file.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »